XNA – Game software for beginners

Microsoft XNA Game Studio Express – product review

Last year in august, Microsoft has released beta version of XNA Game Studio Express. This software suite for game development represents new gate into computer games world. This development environment is designed for creating PC games working on Windows XP SP2 and Windows Vista operating systems, and for Xbox 360 game consoles. These days the full version is available, and moreover you can subscribe the game development challenges and win some prizes. It’s time to review Microsoft XNA Game Studio Express


Current computer games cutting-edge titles “with three A“ compete who brings better and higher quality of visual cover, more realistic physical principles implementation, or more authentic stylization of imaginary worlds. And who still doesn’t know he should be assured the computer games are definitely not cheap projects – development costs and surrounding overhead goes to millions. Digital arts are actually powered by technologically sophisticated game engines and their development usually takes several years of intensive work.

XNA Screenshot
Developing with XNA is sometimes really drag’n’drop.


From an idea to the game

In game development, the requirements to the developer are usually much higher than just perfect knowledge of programming language and algorithms basics. The key factor is knowledge of higher math (linear algebra, vectors and matrixes) and physics (bodies collisions, object deformations or authentic ray tracing). Even other important areas can’t be missed, such as artificial intelligence programming, fuzzy logics, and acoustic effects.

Computer graphics is an important area which includes everything from 3D modeling of characters and objects to designing final scene projection. Nevertheless the main pillars are situated on purely mathematical basis, because math theory exactly describes all the patterns determining computer image generation.

Game technology map XNA Pillars Content relationships
XNA Game Studio Express structure schemes

MDX = DirectX for .NET

For developers to avoid inventing and programming everything from the scratch, there were created lots of libraries with the goal to encapsulate the base functionality. Nowadays the most popular functional set is probably Microsoft’s DirectX, which incorporates classes to control the graphics, sound and input devices.

DirectX was from the very beginning developed as native, while mostly C++ developers became its main target users. The library itself worked according to COM standards so it was possible to access it also from other languages (e.g. Visual Basic). After development-execution platform Microsoft .NET Framework appeared, also managed port of the DirectX library called Managed DirectX (or MDX) was developed.

Managed opposite of the COM interface was hearty welcomed, because it offered multimedia development to all .NET programming languages users. The main of these languages was Visual Basic .NET and the other includes C#, C++ with Managed Extensions and many more. Programmers could prosper not only from the familiar integrated development environment, but also from advanced functions runtime environment CLR (we can remember e.g. programming threads management or the automated memory blocks control). Managed Direct X was even extended by such libraries what allow to playback audio or video-samples using just two lines of source code.

Of course, MDX wasn’t bug-less as nothing else is. Maybe the most criticism was about performance penalizations, which caused the games developed e.g. in C# language in combination with MDX were slower than their native equivalents. This performance loss usually varied from 10 – 30% according to the kind of the game and used techniques. One of the reasons was surely the presence of the virtual runtime machine CLR, which was responsible for just-in-time compilation of the MSIL language middle code.

However, the above mentioned performance decrease was not tragic any ways; the testing transfer of Quake II by id software can prove it. Conversion of this popular 3D action shooting game was done by the guys of Vertigo Software. It took them just several days to complete the conversion. Moreover, also extending of the game features is included in this time. The result was about 15% slowdown of the Quake II .NET version in compare with original, what is hardly recognizable difference in normal use.

Add new item - Correlation Create new project Correlation - Microsoft Visual C# 2005
XNA Game Studio Express screenshots

XNA Framework and XNA Game Studio Express

After managed Direct X proved it had good future, Microsoft came with compact technological solution, which basis was set of the managed libraries covered in XNA Framework. XNA Framework collection cooperates with .NET Framework 2.0 platform and consists of lots of classes specially targeted for 2D and 3D game development.

Both foundation classes library (FCL) of .NET Framework 2.0 platform (for standard operations), and libraries incorporated in XNA Framework (for “gaming” actions) are available in one for developers. XNA Framework focuses to make game development easier according to the slogan “let everybody can create his own game”. Another important issue is smooth multiplatform interoperability which implies easy porting games between PC and Xbox 360 platforms (this all is reached thanks to almost the same APIs). Releasing XNA Game Studio Express by the software giant Microsoft should enjoyed every programmer who wanted to use a new gate to game development industry.

XNA Game Studio Express is not a stand-alone integrated development environment, but the extension of Visual C# 2005 Express. This means express edition of Visual C# must be installed and properly registered at the computer (this requirement however doesn’t complicate the situation because it’s available for free to anybody at Microsoft’s website).

Try it!

You can use development software XNA Game Studio Express to create the games for PCs with operation systems Windows XP SP2 and Windows Vista (Windows 2003 Server is not supported) and for game consoles Xbox 360. At hardware level, graphics card compatible with DirectX 9.0c, including shaders version 2.0., is required. Newly introduced product is targeted to beginners, students and newbies in game development area.

Because the only supported programming language is C# (version 2.0), future game developer must handle this language the first. After they manage it, they can go forward to XNA Framework library and “real” game development.

We really appreciate the project templates which can act as the starting points the programmers can build over them. There are just two templates yet. First one will help you to establish an game project, whereas second one can be used to build a library of the functions to be used in a computer game.

Starter kit is very useful information source helping users can build up fully functional 2D space shooting game Spacewar in few moments. Just a small comment on this – the keyboard control doesn’t work after game is run. You can fix it by un-commenting the line with directive #define USE_KEYBOARD in GamePadHelper.cs file, which you can find in Common folder. Starter kit provides you with complete suite with full source code as well as game content files (models, textures and sound files). You can download new templates for other games from the web.

Starter kit is also very educative making the game development a funny session. Users obtain a complete product to try the change every detail and to observe what game functional results, caused by the changes in the code or the content file, it brings.

Forming the terrain Forming the terrian Forming the terrain
Forming theterrain

Development acceleration

Competition advance of using the combination of the XNA Frame work and .NET Frame work 2.0 libraries is fact the responsibility for processing the initializing actions (e.g. creating a window, processing the message, listing the graphics adaptors or the Direct3D device creating) is moved to built-in classes. This is really revolutionary change what is the major factor speeding up the game development process. Developer is not forced to solve all the niggly trivialities but he can immediately start building an application logics. Just for comparison it was necessary to write a large amount of the code to solve these matters in native C++ and Win32 API (or MFC).

XNA Framework collection is divided into layers, which starting at the low-level API and becoming more and more abstract. Functionally related classes are situated in nominal spaces which create the following modules:

  • 1. Application module: represents the basic skeleton of the computer game
  • 2. Graphical module: provides 2D and 3D graphical objects displaying
  • 3. Mathematical module: focused to vector and matrix transformations
  • 4. Controller module: monitors the keyboard, the mouse and the Xbox 360 console controller activity
  • 5. Sound module: responsible for sound effects and music
  • 6. I/O module: processes the data reading from and writing into files


Working with particles Working with particles Working with particles
Working with particles


XNA Game Studio Express is remarkable product which was missing on the software market yet. The computer games development is really difficult process so the Microsoft’s activity to bring the required know-how to the hands of the beginners and game enthusiasts is very helpful. Game enthusiasts are the people who can come with lots of amazing ideas for new game titles.

The programming itself is very fast and flexible mainly because of quality support provided by integrated development environment Visual C# 2005 Express. If you ever longed for knowing the creation of the computer games process, you have unique opportunity to turn your dreams to live.


Provided by:
Microsoft, www.microsoft.com


Download at:


Ján Hanák is regular external editor of Software Developer magazine. You can reach him at [email protected] .