Is MonoGame just XNA?
Asked Answered
I

3

35

So I want to learn C# and XNA but after some research is came to my attention that XNA is apparently dead, and there is an alternate library called MonoGame which uses XNA framework.

So, can I use XNA lessons/ tutorials for MonoGame or are the major differences in the way programming is done depending on what you use making XNA tutorials completely useless for MonoGame?

Intestinal answered 9/2, 2014 at 11:28 Comment(2)
This question is off-topic. Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.Yim
@Yim It would have been faster for you to make the minor edit required to make the question on-topic than to post your comment and downvote.Unbraid
W
48

Almost.

MonoGame doesn't use the XNA framework, it is a re-implementation of the XNA framework. The difference is that all of the code inside MonoGame has been re-written to behave identically to the XNA framework.

You're probably wondering why someone would want to re-implement something that already exists. Well, you're correct in saying that XNA is "dead" so to speak. You can in fact still use the XNA framework if you want but it's no longer supported by Microsoft on Windows 8 or above.

However, that's not really the primary reason MonoGame came about. The real reason is that XNA only works on Microsoft platforms (e.g. Windows, XBox, Windows Phone). MonoGame's purpose is to allow existing XNA code to be easily ported to other plaforms (e.g. iOS, Android, Mac OS X, Linux, Windows 8, Windows Phone 8, PlayStation Mobile and the OUYA console)

Yes, you can use XNA lessons / tutorials for MonoGame most of the time. MonoGame's code and behaviour is intended to work exactly like the XNA framework. I say intended, because it's not perfect but it does work very well and there are plenty of games already using MonoGame to prove it.

Weinberger answered 9/2, 2014 at 12:40 Comment(3)
Thank you for the info! :D PS. "You can in fact still use the XNA framework if you want but it's no longer supported by Microsoft on Windows 8 or above." Does this mean I can't use the XNA Framework if I have Windows 8?Intestinal
I believe the XNA installer refuses to install on windows 8. I think some people have managed to hack around it but it's certainly not supported by Microsoft. You make the game in XNA but then you are limited to the platforms you can release on. Ironically, you can use MonoGame to release games to the windows 8 store.Weinberger
I've recently started using MonoGame on Windows 8 in Visual Studio 2013. Everything seems to work as expected without any headaches, although, I am not using XNA's content pipeline so there may still be some issues with that.Weinberger
P
8

XNA can still be used on windows 8, despite the being not supported. To do so you have to install a n additional component first. You have to download Windows live Games redistributable, then XNA, and it will work on windows 8.

Phuongphycology answered 9/2, 2014 at 15:35 Comment(1)
XNA cannot be used to make Metro Apps, it can still run on Windows 8 in desktop mode.Composed
S
0

A 2022 updated answer, craftworkgames answered best:

Yes, you can use XNA lessons / tutorials for MonoGame most of the time. MonoGame's code and behaviour is intended to work exactly like the XNA framework. I say intended, because it's not perfect but it does work very well and there are plenty of games already using MonoGame to prove it.

The following how-to is an updated expansion/extension of willthiswork89's answer. I do not suggest using it, but it is worthy of a modern answer.


As long as the DirectX9 runtime libraries are installed, XNA programs continue to run as of Windows 11. Do not forget to reboot after the DX9 installation.

The XNA installer will fail to run on modern versions of Windows. Start running the installer and leave the window open at the first prompt (to allow the installer extract the files, but before it deletes them), and find the temporary files in %tmp% or %temp%, Type this in File Explorer then sort by date (the folder name is a GUID and the newest one) and manually execute(double click) each of the .MSI files found.

The templates are a different story(MS VS > 2013). I suggest downloading a complete XNA example .SLN project, and cleaning it up after the update process, to provide a starting point.

You may still have to update the project references(the names match, but the versions may be different).

Note: GamerServices is mostly, if not totally, defunct.


I suggest using MonoGame < 4.0 as a cross-platform drop-in replacement for XNA. Instead of using this answer, since Monogame is feature complete and cross-platform.

If you prefer the old .sln project style, or require .Net framework 4.5, then look to Monogame 3.7.

Syllogism answered 21/8, 2022 at 2:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.