Sep 19 2011

Introduction to XNA 4.0

Category: Novice | XNABrian Legg @ 09:49

If you're already familiar with .NET (either VB or C#) and you want to start creating video games for the XBox 360, Windows Phone, or Windows PC then XNA is exactly what you're looking for. This post is not intended to be the all-encompassing learn everything about XNA tutorial. I'm creating this as a starting point for those who have never used XNA before and want to jump in quickly and also as a reference point for those (like me) who frequently forget some of the basic things you set once and forget about. I like to keep explanations short and prefer to demonstrate things using code, so if you want to know more about how XNA works internally you'd be better off getting one of the many books out there on the topic. On the other hand, if you just want to start coding a game right now to see how XNA works you've come to the right place.

What this post will cover

  • Full screen game
  • 2D graphics
  • Keyboard, Mouse, and XBox 360 controller support
  • Sound effects
  • Collision Detection
  • Sprites
  • Keeping score and using Fonts

What this post will NOT cover

  • The installation of XNA Game Studio 4.0
  • Proper game architecture
  • 3D game design
  • Animation
  • Models
  • Asset Creation

The only prerequisite for beginning this tutorial is the XNA Game Studio 4.0 which is available from Microsoft's website. I intend to keep this game extremely simple and it will NOT be anything worth keeping. However, I hope you learn a lot while writing it. Here's a brief description of what we'll be making - A mouse and keyboard (or XBox 360 controller) controlled dinosaur which can roar and eat meat. Each time he eats a piece of meat it will be replaced somewhere else on the screen and a score will be kept in the top right corner. Without further ado, let's get started. More...

Tags: , , , , ,