Game Creation with XNA/Basics/Setup
For this book we will use Visual Studio 2008 and the XNA Framework 3.1. Although there are newer versions available, for many reasons we will stay with this older version.
You should first make sure that you have a newer version of Windows, such as XP, Vista or 7, with the appropriate service packs installed. In general, it is a good idea to use the US version of the operating systems. In addition, since at least DirectX 9 compatibility is needed, you may not be able to use a virtual machine (such as Parallels, VMWare or Virtual Box) for doing XNA programming.
Install Visual C# 2008 Express Edition
First download the C# 2008 Express Edition from Microsoft. You can also use the Visual Studio Express version. Installation is straightforward, simply follow the wizard. After installation, make sure you run Visual Studio at least once before proceeding to the next step.
Install the DirectX Runtime
Download and install the 9.0c Redistributable for Software Developers. This step should not be necessary on newer Windows version. First, try to get away without it, if in a later part you get some funny error message related to DirectX, then execute this step.
Install XNA Game Studio 3.1
After having run Visual Studio at least once, you can proceed with the installation of the XNA Game Studio. First, download XNA Game Studio 3.1. Execute the installer and follow the instructions. When asked, allow communications with XBox and with network games.
Test your Installation
To see if our installation was successful, let's create a first project.
- Start Visual C# 2008 Express Edition
- select File->New Project under 'Visual C#->XNA Game Studio 3.1' you should see a 'Platformer Starter Kit (3.1)', click OK to create the project
- to compile the code use either 'Ctrl-B', 'F6' or use 'Build Solution' from the Build menu
- to run the game use 'Ctrl-F5', enjoy
- take a look at the code, among other things, notice that a 'Solution' can have several 'Projects'
Next Steps (optional)
We will only develop games for the PC, if you want to develop games for the XBox also, you need to become a member of XBox LIVE and purchase a subscription (in case your university has a MSDN-AA subscription, membership is included).
You need to be attentive of which XNA version you have to install.
|Visual Studio||XNA Game Studio|
Sarah and Rplano