In part 1 of this series I gave you an overview of MonoGame, an open source cross platform implementation of the XNA namespace and class model and how you could use that to port you existing XNA code to Windows 8. In this article, I will show you how to get your development environment setup to support your porting effort.
This is a 3 part series. You can reach the other posts in this series here:
Developer System Requirements
Install in this order
|Install the items to the right in the order specified.
NOTE: Why Games for Windows? I encountered an installation failure when installing the Visual Studio 2010 Express for Windows Phone tools. The XNA support would fail.Aaron Stebner’s directions to download and install the latest version of Games for Windows fixed the issue. Once that is installed, run the setup for the Visual Studio 2010 Express for Windows Phone and all should go smoothly.
You may be wondering, why do I need Visual Studio 2010? There is a feature of XNA called the Content Pipeline, a pre-compiler step in the preparation of graphic and audio assets for use at runtime in XNA. This feature is not implemented in MonoGame. Therefore you need Visual Studio 2010 to pre-compile your game assets which you then copy over into your VS2012 project. More on that step in part 3 of this blog series.
MonoGame is an open source project managed under Git. In order to use it you will need to fork the repository from GitHub and then create a clone in your local environment.
To do that you will need an account on GitHub and a Git Client. I like the GitHub for Windows client. It has a nice Metro look and feel. It will get you in the mood to develop for Windows 8
After you install the GitHub Windows Client you will have 2 programs available, GitHub (GUI) and Git Shell. The Git Client is a Metro ‘Styled’ desktop application that provides a GUI interface. Git Shell is a PowerShell based command line interface to Git. We will use Git Shell for our purposes.
There are a lot of developers who contribute to MonoGame. The Windows 8 support is being developed by Tom Spillman and James Ford of Sickhead Games as well as several other talented developers. In particular we will be using the develop3D branch. That is where the Windows 8 support is being submitted.
Cloning the MonoGame Source Code
1. Run Git Shell
2. Navigate to the location on disk where you want to clone the source code (use CD command)
3. Type the following command to clone the MonoGame project:
git clone https://github.com/mono/MonoGame
5. Now we will initialize the project submodules by typing the command:
git submodule init
6. And then update the submodules
git submodule update
This may take some time so head over to the Windows Surface site to check out the new devices.
When the process completes you can navigate to the MonoGame folder and list out the contents
Create and Deploy the Visual Studio MonoGame Project Template
1. Open an Explorer Window and navigate to the MonoGame Project directory, then to the templates folder:
2. Create a Zip of the all files in this directory
C:\Users\[you]\Documents\Visual Studio 2012\Templates\ProjectTemplates\Visual C#
Now you are ready to add your XNA graphic assets and code. In part 3 of this blog series I will cover the basic format of an XNA application and my code migration experience.
Generation App: Getting You There
We are here to help you get your app on Windows. Here is how you can gain an advantage and stand out from the crowd through the programs we’re offering:
- Design Consultation
- Technical Consultation
- Online training and tips from insiders