Posted by: kurtsh | July 22, 2008

HOWTO: Start building games for Xbox 360

[this is a republish of MSDN UK’s newsletter article]

image XNA Game Studio
Platform games, shoot-em-ups, racing games, and adventure games. Peek this and poke that and the next generation of software developers were born. But why don’t people write games for fun anymore? Perhaps games and their programming languages went in different directions, we all grew up and wrote database applications. Writing simple games became hard and the immediacy and fun just got drowned out in the API calls and lines of C++.

Move forward a couple of decades, and enter XNA Game Studio. The founding principle behind XNA Game Studio was to enable people who like coding for fun to create and share great games. Games can be written once and with minimal changes be deployed to run on Windows or the Xbox 360. Version 2 of XNA enabled the creation of networked games over Xbox Live and with version 3 (currently in CTP) games can now target the Zune!

XNA comprises a collection of code frameworks that simplify the game creation process. Namespaces for handling player input, storage, sound, maths, networking, and of course, graphics are provided – the latter provides 2- and 3-D handling, including sprite management and collision detection. Key to the framework is two core infrastructure elements – the Game Class, and the Content Pipeline.
The Game Class provides a convenient set of event handlers that constitute a typical game loop – get input, update the game state, update the screen. You insert your game code in the handler routines, and XNA does the heavy lifting.

The Content Pipeline is key to how XNA can provide both independence between deployment devices and handle game resources from multiple sources. When a game initialises, the game resources (such as sounds, meshes, textures etc.) are loaded into the pipeline. During game play, you can access your resources from the pipeline as needed – and because XNA uses generics, you can ensure type-safe access as well.

As well as the Framework, XNA provides a set of extensions to Visual Studio to allow remote deployment and debugging of your game to an Xbox 360, or Zune. Currently v2.0 supports Visual Studio 2005, and the 3.0 CTP supports Visual Studio 2008.

image Finally, bringing the whole community together is the XNA Creator’s Club where you’ll find everything you need – from discussion forums to complete game source. More recently we launched the Creator’s Club Online where you can share your games with the community or peer-review and download games from other XNA fans.

Getting started with XNA couldn’t be simpler – especially since everything you’ll need to write great games for Windows is FREE, and available for download. Everything you need to know about creating your first game can be seen in the Quick Start guide.

C’mon – what are you waiting for? Me? I’m off to play snake…

Andy Sithers
Academic Evangelism Manager
XNA Team Blog


%d bloggers like this: