If you haven’t done anything with MonoGame yet, and you’re thinking about trying it, you should go do that right now instead of reading this. I don’t want my opinion to sway you too much. Mostly because then I want you to come back and tell me what you thought about it.
The TL;DR Version: My experience with MonoGame was bumpy: buggy, limiting, and just generally didn’t meet expectations. It doesn’t feel like an appropriate replacement for XNA yet.
For starters, I want to say that the reason I’m exploring MonoGame is because as I wrote about in an earlier post, it would appear that we’ve reached the end of the line with XNA.
I’ve heard lots of good things about it. Especially all of the platforms it supports. That’s actually pretty enticing. It makes MonoGame one of the more realistic alternatives to XNA. For that reason, I decided to dig in and start dissecting the differences between MonoGame and XNA, and put together some tutorials to make it easier for others to jump in as well.
So I spent some time last night, and then much of today doing just that.
What I ran into was, unfortunately, a series of problems, bugs, and limitations. In just a few short hours, here’s what I saw:
- I tried installing MonoDevelop. It failed and told me I needed Gtk#. So I went to the Mono website and downloaded their Mono+Gtk#+XSP. Then I re-ran MonoDevelop. It failed again. So I went back to the Mono website and installed just Gtk#, as a separate package. At this point, I could install MonoDevelop. But it really didn’t make sense to me why the first download didn’t cover that. Whatever. It’s not MonoGame, so let’s carry on.
- I got the MonoGame Add-in loaded and went to create a new Windows game. I saw the MonoGame templates but none of them looked right. There’s a template for Android, OUYA, iOS, Linux, Mac, and Windows OpenGL. Strange, thought I. Why isn’t there just a Windows, or a Windows DirectX? I jumped over and installed what they had for Visual Studio and saw the same options. At this point, I assumed I had done something wrong, and uninstalled and reinstalled everything. When that failed, I went to the Interwebs. Turns out, they don’t have a Windows/DirectX template. They will soon, but they don’t have one yet. Alright. Whatever. So I need to use OpenGL for the time being.
- I get my little game opened and go to start running it, then BAM! A strange error about not being able to find the OpenGL 2.1 entry point. I can’t even run a default cornflower blue game. After some Googling, I discovered that perhaps my drivers are out-of-date. This is strange, because I have a nearly brand new laptop with a fairly decent graphics card in it. They hardly had the chance to get out-of-date. After updating my graphics card drivers (which behaved incredibly strange, but that’s a story for a different day) it worked.
- Next, my screen opens up in full screen mode. Yay! A blue screen of joy! But… I couldn’t close it. There’s no red X, and because I didn’t have an Xbox controller plugged in, I couldn’t just close it. Why does MonoGame default to full screen when XNA does not? Obviously, you can still close it by hitting Windows + D, or Ctrl + Alt + Delete and going to the task manager, but this shouldn’t be the default.
- So I next try to load some content. I add my assets to the Content node in my Solution explorer. This turns out to be just a folder. There’s not really much special about it. That’s because there is no content pipeline in MonoGame. Yet, this is one of the things that make XNA worthwhile. They’re working on it, and they want to include it, but it’s not there yet. They recommend, instead, that you use XNA’s content pipeline to build your assets. Instead, I found a different workaround for doing this that’s good enough for the time being.
- So I get my image loaded and start drawing it on the screen. Basically, it’s a replacement cursor. In XNA, by default, the cursor is turned off in an XNA window. In MonoGame it’s turned on. That’s fair enough. It’s easy to change. So I go to turn it off, but nothing works now. Either I did something wrong, or MonoGame doesn’t just hide the mouse, they move it to a point off the screen where you can’t see it or something. As I moved the mouse around, it kept popping up at the bottom of my screen, and eventually I accidentally performed that little mouse wiggle thing where all of your windows minimize. I got frustrated and just turned the mouse back on. I still haven’t sorted that one out yet.
- So I get all of that sort of working. Now I go to close my game but on closing, I get a strange AccessViolationException. That’s quite odd indeed. I played around with it for a little bit, trying to figure out what line of code was causing it (the default cornflower blue template doesn’t cause it–you need to draw sprites before closing). Again, I gave up pretty quickly and just went to Google. Turns out, MonoGame forgot to implement IDisposable on the Game class or something, because them failing to clean up the Game object on exiting was the problem. It turns out to be a trivial fix, and it appears the fix is in their development versions of the source code, but not to production yet.
Well. That’s my experience so far.
I love the promise of MonoGame. But it doesn’t seem like it’s there yet. There are some pretty cool games that have been made with MonoGame, but after my little experience today, I’m sitting here scratching my head trying to figure out how. Did I just discover every single bug and limitation in MonoGame, or is everything else going to have just as many problems?
Getting back to where we started, as often as I’ve heard that MonoGame is much better than XNA, it doesn’t appear like it to me. It’s got a lot of limitations and problems still. It doesn’t feel as mature as it perhaps should be to be a viable replacement or even just a counterpart to XNA. Yes, it’s open source, which means I could go fix all of the problems I’m complaining about. And that may end up happening.
Maybe I just had inflated expectations about it. But even still, it’s NOT to a point where I’d be comfortable or confident telling everybody, let’s quit using XNA and just use MonoGame! It’s just not there yet.
What are your opinions?