Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is MonoGame really cross-platform?

Tags:

mono

xna

When I download MonoGame (which I will use in place of XNA since I'm on a Mac) and unzip it, all the MonoDevelop solution files are named MonoGame.Framework.[PLATFORM NAME].sln, with [PLATFORM NAME] being, well, the name of the OS. And the code in the tutorials is different for each platform, so it appears that for a MonoGame app to run on a different machine, it must be ported. Is this correct? If so, what other versions of XNA are there for Mono, preferably that work on the Xbox 360? I've seen MonoXNA, but it doesn't seem mature enough to use as of this post.

like image 729
Jwosty Avatar asked Jul 09 '12 14:07

Jwosty


1 Answers

MonoGame makes your code cross-platform by providing the XNA API on multiple platforms. (But it does not make your compiled binary cross-platform like, say, Flash or Java would.)

MonoGame itself is not cross-platform, in the sense that there is a version of it for each platform - as each version contains a large amount of platform-specific code required to implement the XNA API for that platform.

(Although in reality substantial amount of MonoGame code is cross-platform and shared between different MonoGame versions - because it is, in turn, built on layers like Mono, OpenGL and OpenAL that, like MonoGame, provide a consistent API with a different underlying implementation on platform.)

This is exactly the same as Microsoft's official XNA implementation. There are 3 different versions of the XNA library (Windows, Xbox 360, and Windows Phone). They all provide the XNA API. And your code that uses the XNA API can be built for any of those platforms.


MonoXNA is pretty out of date, and most of its useful code has made it into MonoGame anyway.

As far as I know there are no other current XNA implementations that use Mono to run on OSX. There's ExEn, which uses Mono - but only for iOS and Android.

Your only option for using XNA on Xbox 360 is to use Microsoft's version. But this doesn't preclude you from also compiling your code against MonoGame.

like image 63
Andrew Russell Avatar answered Sep 20 '22 16:09

Andrew Russell