Learning XNA...

Giuseppe Maggiore, Microsoft student partner at the faculty of computer science of Venice, is leading a series of lessons about Microsoft XNA. I have been attending these interesting lessons from the start, and last week Giuseppe announced a Microsoft sponsored contest: the objective is to produce a little XNA demo game with spaceships, planets and such. The first prize is an XBox 360 and an XNA premium membership account! ![]()
Obviously, I'll have to try and win that prize!
I'll try to cover my partecipation to the contest in this series of articles, displaying the evolution of the game, step by step, as I'm going to build it.
Objectives
First of all, I'm firmly decided not to hack together an ugly demo to show off some of the techniques available on XNA. I neither want to develop a full blown XNA game engine, but I'd like to take the time to define a flexible architecture for the game and develop it in a cleanly coded project.
The formal objectives of the contest are the following:
- Build the model of a solar system: this is gonna be fun, with moving planets, orbits and so on. I'll skip on realism and try to be as creative as possible.

- Collision detection: I know this is one of the hardest components to develop correctly and efficiently (it's one of the "difficult" problems of class hierarchies and can be solved by double dispatching, but I'll have to investigate...).
- Moving cameras: easy.
- Advanced shading: this is gonna be fun! And also, lots of code around on the 'net.
- Game logic: I have some interesting ideas about this.
Setup
There are several needed components in order to start coding: first of all, Visual Studio!
XNA 2.0 seems to be compatible only with Visual Studio 2005. I originally switched to Visual Studio 2008 since Beta 2 and wouldn't like to switch back just for this contest, but hey... (I'll miss automatic properties in C# and all that nice stuff though
).
I got a Visual Studio 2005 professional license from the university's MSDN Accademic Alliance and then had to upgrade it with the following additional downloads from Microsoft:
- Visual Studio 2005 SP1,
- Visual Studio 2005 SP1 update for Vista (not sure I needed this),
- XNA Game Studio 2.0, of course!
And that's it: after 2 hours or so of installation, I'm ready to go!



