Topics
Social
Subscribe

What You Need to Know about Creating Games with MonoGame

Video game controller

MonoGame is a multi-platform setup for game/application development that lets you write an application once and then deploy it over any platform you want (windows, win phone, android, ios, xbox, etc). 

It’s just one way of writing a game, but it’s handy for folks who think, “I want to write a game and I know C#, where do I start?” You get access to everything from 3D graphics to nice sprite support.

For those who haven’t written games before, you need to approach it differently than what you do normally. They don’t work on a Request/Response basis. 

Instead, there’s a game loop that listens for input. Microsoft originally had a platform called XNA, which provided a basic framework for game development, but they’ve recently stopped most of their support for it. When they dumped XNA, a bunch of the guys from the team wrote an exact port of it and then added support for multiple platforms and thus MONOGAME WAS BORN

The Benefits of MonoGame

In the backend, it uses Xamarin to port to iOS and Android, so development is completely transparent. You write the code once and MonoGame generates all the other platform stuff. This is awesome because you don’t need to know 20 different languages to make a game, but you have to manage the build settings/binaries yourself which kind of sucks. 

You should have multiple projects set up containing the exact same code files, i.e. a C# project is where you do development, and you have an Android project that doesn’t contain physical files, but links to the original files. Then when you build, it packages them up into their own appropriate bins.

MonoGame supports all of your basic game functions, with some nice little goodies. It supports user input for all the basic stuff you’d want (keyboard state, game pad, touch, etc). Also, it has a good level of abstraction with handy functions to take care of the nitty gritty stuff that’s really awful when doing game dev. 

MonoGame manages asset opening on separate platforms (ie. the same image or sound file can open on all platforms regardless of support). To do this, you run your assets through a program that converts them to a .xnb type. MonoGame then magically knows what to do. 

One of the cooler things is that language constructs work across platforms that may or may not support them. For example, if I write a nifty little lambda expression in C#, that code is still supported when it converts to run on iOS even though Objective C (I believe) doesn’t support lambda expressions.

Now for the Crappy Bits…

MonoGame is free, Xamarin is not. Xamarin, which converts the game to iOS and Android platforms, runs somewhere between $300 and $1000 for a license. Not only that, but you need two separate licenses, one for iOS and one for Android. 

In addition, you still can’t get around the Mac: YOU HAVE TO BUILD ON OUR OS BECAUSE…UMMM….WE SAY SO! 

Along with that you have the basic stuff where you need to be a member of the Windows/Mac dev community in order to release it on the store, which makes sense, but costs another $100 a pop. 

Overall, MonoGame is great for smaller teams of developers or hobbyists. It's not as powerful as something like Unity, but it's easier to manage.

{{cta('bc4e29b7-03bc-4ffe-be1c-db1d1bc17a27')}}

 

 

Continue Exploring

Approach

Culture

Careers

Our Work Services Commerce Cloud Approach Culture Blog Careers Contact

3344 Grand Ridge Drive NE
Grand Rapids, MI 49525
616 365 1000