XNA and a Windows 8 Store game? MonoGame!
- Posted: Aug 27, 2012 at 6:00 AM
- 18,290 Views
Today's Modern UI Monday post is a series by Bob Familiar that shows us how we CAN XNA in a Windows 8 Modern UI application, with a little help from MonoGame and SharpDX.
In Part 3 I will cover migrating XNA code to Windows 8.and the Windows 8 features you will need to support in order to make your game Windows 8 Store worthy.
What is MonoGame? Bob's covers that well in Part 1;
Using the XNA Framework is not a choice for building a Metro Style App. Official Microsoft guidance on game development is documented here. The recommended way to build highly immersive games on Windows 8 is to use HTML5/JS, XAML/C#, XAML/VB or C++ and DirectX, all great choices. But if you have been developing with XNA and have an existing code base, your only option it would seem is running as a desktop app.
This is where MonoGame comes in…
MonoGame is an Open Source implementation of the Microsoft XNA 4 Framework. The goal is to allow XNA developers on Windows & Windows Phone to port their games to the iOS, Android, Mac OS X, Linux with both PlayStation Suite and Windows 8 support currently under development.
MonoGame provides a cross platform XNA Framework implementation for XNA developers who want to take their code to non-Microsoft platforms as well as the ability, thanks to Tom Spillman and James Ford of SickHeadGames, Dean Ellis and several other talented developers, to target Windows 8. Using MonoGame for Windows 8 you can take your XNA code and with a recompile and some additional platformisms create a Metro Style App worthy of the Windows 8 store.
MonoGame is still under development and so any use of it should come with a note of advice to stay on top of that effort. Also as game developers we should always be looking at expanding our game development skills on Windows using HTML5, XAML and DirectX in order to get the most out of the platform. But given that so many developers have XNA games, MonoGame for Windows 8 is a viable migration solution in the near term.
Part 2 covers getting your MonoGame dev environment setup and ready for coding.
In Part 3 he gets to work converting and writing XNA Windows 8 Store app's (which he gives you the Source for too
My next project with MonoGame was to build a simple 2D game from scratch and add the feature support necessary for Windows 8 Store submission. I decided to implement the ancient game of strategy, intrigue and cunning…tic-tac-toe.
One of the great tips was how to deal with XNA Content Pipeline projects (which VS 2012 doesn't have support for yet);
The Content Pipeline
The Content Pipeline is a special set of assemblies included with XNA Game Studio that use MSBuild to compile game assets such as image and sound files into streamlined, pre-processed binary files called XNBs (so named for the fact that the file extension of the compiled version of a source file is changed to .xnb) which load quickly at run-time.
At this time, MonoGame does not have an implementation of the Content Pipeline and Visual Studio 2012 RC does not have native support for XNA development therefore we will need another way to create the XNB files from our graphic and sounds assets.
That is where Visual Studio 2010 comes in. You can use Visual Studio 2010 to compile your graphics assets and then add them to your Visual Studio 2012 MonoGame project.
Finally he provides the information and tips for making your MonoGame a Good Windows 8 Store Citizen
Supporting Windows 8 Features to Make Your App Store Worthy
Once you have your XNA application running on Windows 8 you will want to add the features that the Windows 8 Store requires for all Metro Style Apps. Chris Bowen has written a great piece called The Top Ten Secrets of App Success that details several of the most critical features you need to support. I will cover some of these here. These features include but are not limited to:
- App Tiles and Splash Screens
- Using the MessageDialog
- Screen Management – Snap, Landscape and Portrait
- Process Lifetime Management (PLM)
While you do have to jump through a number of hoops to make this work, if you have a good bit invest in XNA and don't want to jump to DirectX directly MonoGame could be a viable option for you.