MonoGame for Windows 8 tutorial and ton's of new samples too
- Posted: Aug 13, 2014 at 6:00 AM
- 10,703 Views
It's been a while we've chatted about MonoGame.
What is MonoGame?
Write once, play everywhere.
One framework for creating powerful cross-platform games.
By leveraging C# and other .NET languages on Microsoft and Mono platforms you can write modern, fast, and reliable game code.
We currently support iOS, Android, Mac OS X, Linux, Windows, Windows 8 Store, and Windows Phone 8 with even more platforms on the way.
All the code is available to you ensuring you'll have the ability to make changes when you need to or even port to whole new platforms.
With 100s of games shipped we have built up a vibrant community of developers which use MonoGame for both fun and profit.
Want to get started with MonoGame 3.2 to build Windows 8 games? Michael Cummings has just the post...
MonoGame is a cross platform open source implementation of Microsoft’s XNA framework. MonoGame has been under active development for many years and has been used in a number of games on iOS, Android, Ouya, and of course Windows 8 and Windows Phone 8. In this post, we will cover how to set up your project structure to build for Windows 8 and in a later post for Windows Phone 8. We will also add a few elements to our scene to see it work. In later posts, we will build a complete game using MonoGame.
You can get the MonoGame libraries in three different packaging formats; source, installer or NuGet. Recently (as of March 2014 ), the MonoGame team has changed how the source is built, so I will not be covering that here. Using the installer is fairly straightforward as well, but offers less in how to build for multiple platforms. In this post we will be using the NuGet packages to configure the projects files and build our first sample.
There are literally tons of examples that use XNA to demonstrate some game technique, mechanic or even entire games. This tutorial extends a tutorial that was published on the MSDN site for XNA Game Studio 3.1. For this series the code and tutorial text has been updated to match the MonoGame Framework. For other tutorials and samples, in general, if the code was written for XNA Framework version 4.0 or for the Windows Phone, then it should work with very few changes.
Create a Windows Store Project
If you run your game now you should see the ship displayed in the center of the screen, like so:
This concludes this part of the introduction. You were able to create a new empty Windows 8 project, and add the MonoGame libraries. You used the MonoGame Framework to draw a 3D model of a ship on the screen. And you were able to run the game in the Simulator and see the ship drawn on the screen. Stay tuned for the remainder of this game in future posts.
Don't want a step-by-step, instead just want too see a ton of new samples? Simon “Darkside” Jackson highlights just that..
One common question surrounding MonoGame has always been the quality of the samples currently maintained in the various branches of the project.
Being an opensource project, this has always been a challenge to manage and maintain. Sure, there are a lot of samples provided by many hard working developers, but they were very sporadic and not always kept up to date (some it was noted, don’t even run any more).
Seeing this, the core MonoGame team set out with a purpose to being a new samples repository for the project. Its goals were simple:
- The samples had to be of high quality
- They had to work on ALL platforms not just one
- Best practice had to be used where possible
- They had to be testable and re-usable to test the latest builds (builds may not pass if samples tests failed)
It has been an ambitious journey, with a lot of in depth discussions and debates, but now the first of the samples has just been accepted into the new Samples Repo.
The first sample is just a taste of what is to come and is born of the already tried and tested Platformer 2D sample from the age old XNA library.
The sample itself isn’t too much to shout about as it only implements basic rendering, input and audio capabilities. However, it is laid out in such a format and is working on ALL supported platforms, including:
- Windows Phone
- Windows 8
The sample serves as a guide for how to build and manage your game project in a fully multi-platform way with all the code in one place and shared across all projects.
If the platform supports NuGet, then the platform is using the latest MonoGame 3.2 NuGet package. Where NuGet support isn’t available, it references back to the main dev repository (which you’ll need to manually link until the new samples repository is fully integrated with the main repo).
If you write the next great MonoGame, make sure you let us know! :)