Filed under Programming, Reviews, Software, Xbox 360
XNA (which stands for "XNA is Not Acronymed") is a new moniker from Microsoft for tools to make video games for Windows and the Xbox 360. The tools are designed to make developing games easier and accessible to more people. This FAQ is helpful to understand what XNA is all about. The home page for XNA is here.
About a week ago, Microsoft released a beta of the XNA Game Studio Express (GSE). I downloaded GSE this weekend to find out what it is about.
GSE appears to just be a plug-in to Visual C# Express (VCSE). Since GSE is a plug-in, it requires VCSE in order to install. After you install GSE and restart VCSE, everything looks the same. I had to do some digging to find out where exactly GSE "enhances" VCSE. I found 3 places:
- Documentation. The help system has tutorials, a programming guide, and reference for XNA.
- New XNA framework. This framework is built on top of the .NET framework. It adds the following libraries:
- Application Model - game loop, how to pause/exit
- Graphics - 2D, 3D
- Math - vectors, matrices, collision detection
- Input - read the mouse, keyboard, and Xbox 360 controller
- Audio - associate sounds with events, like a gun shot when a player presses a button on the controller
- Storage - generalizes where game data is read from and where game save data goes to so the same code will work on a 360 and a PC without modification
- Templates. When you start a project in VCSE (File->New Project...), you are given some choices about what type of project you want to create (e.g. Windows Application, Console Application, Empty Project, etc.). GSE adds three more options: Windows Game, Windows Library, and Spacewar Starter Kit. The Spacewar Starter Kit is a rewrite of the classic Spacewar game using XNA. All the code is available so you can see how an actual game is using the XNA framework.
I followed a tutorial in the help called "Your First XNA Game." Basically you just create a project based on the "Windows Game" template, add some code to the update and draw functions, and you have quite possibly the worst video game of all time. To see for yourself, download this and extract it to a folder and run "shadowtest.exe." Granted, the point of the exercise is not to make a game, but to show you how to get started making a game, which it does well. It took me about 10 minutes to go through the tutorial.
- C# has a lot of buzz and is growing in importance in the game industry. I'm going to do my home programming projects in C# from now on.
- .NET/XNA can/will be used for video games. If you asked me about .NET use for video games 2 years ago, I would have said it is too slow. That appears to be changing.
- .NET/XNA development is more efficient than STL/OpenGL/OpenAL/etc. Instead of using many isolated libraries, .NET/XNA appears to be a single well organized library with a *ton* of functionality. STL has data types (like a list of strings) that OpenGL does not understand. In order for these libraries to inter-operate, the programmer is required to "massage" data to get it into the proper format. The incompatibilities in data types in .NET/XNA are largely removed since they are built on top of the same data types. Plus, all of the .NET/XNA library is documented in a consistent way, which lowers the learning curve.
- 360 controller is the only controller supported by XNA. This makes sense since the idea is you use XNA to make games that work on both Windows and Xbox 360. It sucks to make games for a PC and not know what controller to target. Now Microsoft is saying the 360 controller *is* the game controller for the PC. This may be bad news for choice and input device manufacturers, but it is great news for PC game development and ease-of-use. XNA-based PC games will "just work" with a 360 controller.
- XNA games will work on an Xbox (PowerPC-based) and a PC (x86-based) *without* recompiling. This is a side effect of using .NET. Just like a Java app can be "write once, run anywhere," same goes for .NET.
There are several forums that discuss XNA. This one is about the XNA framework. This one is about the GSE. This is the parent page that lists forums for different game technologies. I've found a lot of good information browsing through these forums.
Another good place for XNA info is their blog.
XNA is a work in progress and they have a bunch of things coming. This is a technology that I'm going to be watching closely.