[Solved] XNA no longer required to use MonoGame?

Hello MonoGamers,

I see from various sources on the web that MonoGame has finally wrenched itself free of it’s reliance on XNA which is surely a good thing, but I need a little clarification on what that actually means to me as a hobbyist developer for the Windows desktop?

My development environment consists of Windows 7 64 Bit, a fresh install of Visual Studio 2015 community edition and MonoGame 3.4 for VisualStudio and everything is working as it should.

When I create a new “MonoGame Windows Project” I see the familar Microsoft XNA using statements at the top of the code for the Game1.cs file.

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;  

If MonoGame is no longer dependent on XNA why are the using statements not something along the lines of the following instead of those above?

using MonoGame.Framework;
using MonoGame.Framework.Graphics;
using MonoGame.Framework.Input.

etc.

Looking forward to your feedback, thanks.

I guess it’s because they want Monogame and XNA projects to be compatible with future versions with minimal editing? Sure it’s simple just to change the “using” statements, but what if somebody wrote Microsoft.Xna.Framework.Input.GamePadState in their code, instead of having a “using” and writing GamePadState? You’d need to hunt down all the instances and change them.

Of course, this is just a guess.

To maintain maximum compatibility with existing XNA code, we have kept the same namespace. The break from requiring XNA is in the content building. We no longer require XNA to build content.

It is a plan that at some point in the future we will change the namespaces to MonoGame.Framework*, but that will break everyone’s code and is not something that we can just do overnight.

Never ever ever change a namespace “just because”

You break all existing code, samples, books, etc… For absolutely no real gain.

Sony rebranded PlayStation Mobile after version 1 release, from PSSDK os PSM while I was in the process of writing a book. This act of stupidty broke their documentation, my tutorials, resulted in a huge volume of work on my end, for what basically boiled down to a marketing exercise. An act of pure stupid, which they managed to massively trump when they started charging a membership, which effectively killed the entire project dead.

Breaking legacy code is NEVER something that should be done lightly.

OK, Thanks everyone for your replies, they help to clarify things for me.

Is the framework fully self-contained at this point in time?

At the moment I happen to have the Microsoft XNA Game Studio 4.0 download installed as well, but from here on can I safely ignore that and just install the MonoGame download if need be such as whenever I’d do a reformat of my hard drive?

Thanks.

I don’t have XNA installed on any machines at this stage.

Yeah, I don’t think it ever would be a good idea to change the namespace. if it ain’t broke don’t fix it.

Although I’d agree any Monogame specific code should be in a MonoGame Namespace, for addons / extensions and new features beyond what XNA ever had.

I’ve also not had XNAGS or the XNA libs on any of my machines for sometime now :smiley:

*Note, the MonoGame installer is required to get access to the MGCB (the new content builder tool) at the moment.

Thanks everyone for your help.

Apart from the MonoGame way of building content are there any other differences that would trip up someone coming from XNA?

We are slowly adding new APIs, but there are generally few of these, so don’t expect big differences :slight_smile:

Thanks, Nezz.

I couldn’t reply sooner due to issues with my account related to the recent spamming.
I’ve marked the topic [Solved] as all the replies have clarified it for me.