Question

Is it possible to write one single code base using the MonoGame framework and have it compile on the following platforms: Android, IOS and Windows Phone?

Was it helpful?

Solution

You can do this, I have done this for my game Tokyo Hosto for the following platforms: - iOS - Android - Windows Phone - Windows 8 Metro - Xbox 360 - OUYA - Playstation Mobile

I first created the XNA projects, coded them to about 90% and when there was a lull in development (because I was waiting for animation to be sent to me) I started work on a MonoGame port. I didn't do anything particularly clever, instead of copying in my source files I linked them in. This meant there was a single set of code used for each platform.

I simply used compiler directives to iron out the platform specific details.

OTHER TIPS

You cannot have one single code base for MonoGame projects that deploy to iOS, Android and Windows phone. According to the MonoGame website you'll need to use two different IDE's, Mono Develop for iOS, Visual Studio for Windows Phone and Visual Studio or Mono Develop for android.

The good news is that the code you write will be mostly reusable but there maybe some small tweaks.

I'd recommend reading around the MonoGame documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top