Monday, October 15, 2007

XNA Game Development

[This was originally posted at]

XNA is a Microsoft platform for easily creating games. These can run on Windows, and even the XBox.


Essentially, XNA handles the difficult part of image rendering, and provides the developer a simple API. Bill Reiss provides some excellent tutorials to get you started.


An XNA project has the Game class, which provides three main methods;

  1. Initialize - sets everything up

  2. Update - updates the models based on a game clock

  3. Draw - renders images to the screen based on the game clock, and what you updated.

This is a very intuitive API which makes it easy to make simple games, especially 2D classics.


What I find interesting about XNA is that many developers got their start by trying to program simple computer games. However, back in the 80s or 90s, the bar was high because it's relatively difficult to do the image rendering, especially something fast enough for a real game. Many more developers can do the algorithms and simple logic than can do the rendering. Even with Windows GDI+, it just wasn't fast enough. But XNA actually works fast enough to make it worth while.


XNA games can also bedeployed to other Windows machines, you "just" need to install: (1) .net 2.0 redistributable, (2) XNA redistributable, (3) Direct X. It's motivating to be able to share your work with others.


In the next upcoming posts, I'll provide an XNA sample game I created, and compare it to Silverlight.

No comments:

Post a Comment