Industry Tools: MonoGame Review


Not every game that comes out is done with Unity or Unreal Engine. There are many other game engines and platforms out there that have been hugely successful. MonoGame is an example of a successful framework that has had many hit games built with it.

MonoGame is a cross-platform open-source framework that allows you to build both 2D and 3D games. The framework was created with supporting Microsoft’s former XNA graphics engine platform designed for backward compatibility. So anyone that initially made their game on the XNA platform originally can port their project over without having to worry about rewriting their entire game. Newer users to the framework will be confused with having to use the Microsoft namespace. It is intentional and done to serve that backward compatibility. MonoGame is not a product of Microsoft. The framework thrives on community updates in conjunction with the project leads and developers that are maintaining the framework. Games that are showcased also help to bring more indie developers to the platform. For instance, Celeste was built with MonoGame, and it has been extremely successful. There are no royalties, no Pro version, and no locked out features that you need to pay. The development language used is C#, which is similar to unity3d, allowing developers to join the platform quickly. There is still a learning curve when using any game engine but especially with MonoGame. But once you get used it, you will be creating sprites and game loops like a boss.

This framework was built out of a need to develop games for mobile devices and later evolved to become a great framework that can be released on PC, Mac, Mobile, and even the latest consoles (PS4, Xbox One, and Switch).



Community & Documentation

There are over a thousand games developed using MonoGame, and over four thousand members on the community forum pages. With active posts daily. There are a lot of replies on most of the threads, and something that makes me very happy to see is the number of [SOLVED] topics when checking out the most recent posts today. It is very encouraging to see how helpful everyone is when other developers are stuck. There are many categories in which you can post. Whether you are showing off your work, asking for help, or offering your skills to the community, there is a place for you here. There are many more categories dedicated to specific platforms and technical challenges.

The documentation for MonoGame is excellent. They have a lovely introduction and getting started page, which has you get your hands dirty and writing code. It lets you know the minimum system requirements and walks you through setting up your project. Stepping through the code and get used to the way MonoGame/Microsoft’s XNA style for rendering your game on the screen. There are some oddities if you are coming from different engines like Unity that you will have to read the getting started guide and build a few demos to get a good understanding of the development style. The docs do a good job of explaining why you do things, and if you ever feel like you could add more detail anytime by contributing to the Github repository. All documentation for the framework is bundled in the Github, and if you update it in the codebase, it will reflect when it is merged into the development branch.

Amazing Games Built with MonoGame

If it is not too obvious, there are some fantastic and well-known games built with MonoGame. Stardew Valley is one of those games, which, if you were not aware of how the development occurred with this game, it might have been easy to assume it was done with a mainstream game engine. It is great to see games like this are being created and not following the mold of other indie studios. There are many other great games built with MonoGame, such as Tooth and Tail, Chasm, ReDungeon, Towerfall Ascension, and Celeste. Celeste is probably the more well known in that list. But if you are familiar with these other titles, great! They deserve all the attention they can get.

Cross Platform Support

  • PC, Mac, Linux
  • Mobile – Android and iOS
  • Consoles (for registered developers)
    • PlayStation 4 (Sony)
    • PlayStation Vita (Sony)
    • Xbox One (both UWP and XDK) (ID@Xbox)
    • Nintendo Switch (Nintendo)
    • Stadia (Google)

One of the best parts of having these well-known games listed here is confidence. They give you the belief that whatever you need to do for your game can be accomplished and perform well on any system. If Stardew Valley was created with MonoGame and it is accessible on every platform, then certainly your next game can also be a hit on whichever platform you want to target. Granted, if you were not aware already, you would need developer agreements with whichever platform you want to develop for first before MonoGame gives you access to what is required to create on them. But that is out of the scope of this article if you are interested in knowing what this process is, let me know on Twitter! @GameQuesters.

The Code and Game Loop

The Update loop might look familiar to those from the Unity camp. In general, the update method is used for finding collision events, keyboard events, and anything else you might want to determine while the game is running. Anything that you need to determine that is not always true, such as starting a dialogue with an NPC, deciding if a race has ended if the user needs to change a scene because they just finished a boss. The list is endless, but this is where the bulk of your game logic will be. You will want to learn abstraction and organization to prevent this method from becoming too large and have logic get lost.

protected override void Update(GameTime gameTime)
{
    if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
        Exit();

    // TODO: Add your update logic here

    base.Update(gameTime);
}

There is also a Draw Method were you make your graphic calls and render them to the screen. You have to be more explicit about your drawing events—you setup your view general background color. The default cornflower blue might have you thinking its a Unity scene. But this just gives you a blank blue canvas to start with when you run the game. From here, your imagination can take flight, and as long as you keep the proper drawing order correct, you will have a game in no time.

protected override void Draw(GameTime gameTime)
{
    graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

    // TODO: Add your drawing code here

    base.Draw(gameTime);
}

You then draw within a couple of methods labeled SpriteBatch.Begin() and SpriteBatch.End(). Between these statements, you set up what will be rendered. It should be noted that they will be rendered to the screen in order in which they are written. You might have another sprite drawn that will be drawn on top of the other if it was the next line written, and the coordinates (the Vector2 for 2D Vector) are close enough.

You are not limited to just Sprite based drawing. This framework does allow for 3D experiences. So do not feel like you are locked into only 2D development. For example, Infinite Flight was built with MonoGame, and it looks like a fun flight sim to experiment with and see how many times I will crash my airplane. The team behind it contributed most of the 3D code to make your next game possible.



Microsoft XNA

The MonoGame framework is an open-source implementation of the Microsoft XNA 4 Framework. The XNA is not an acronym and was released in 2006. It was meant to be a lightweight version of DirectX to bring indie games on the Xbox, Windows phone, and windows solution faster and in a more approachable experience. There were a lot of great games that came out of this project. There was even a video trailer that was created to prove that games can be made with quality. There was a time that a lot of Clones and sound apps and vibrating games were on the store, and the community as a whole wanted to stand out and show that there are great games that can be created. I have added the video below for nostalgia reasons.

In the end, Microsoft abandoned this project in 2013, MonoGame was able to pick up this torch and allow all these amazing developers to port the games and release them without the worry about being shut down just because Microsoft did not feel like continuing funding the framework. The project now in the hands of multiple people, such as the project leads Steve Williams and Tom Spilman, and the development team behind them, which can be seen on the About page if you want to know more about the team that is currently maintaining the framework. You can also contribute to the GitHub Repository as well!

Thank You

In the end, I want to point out that it is not the engine that makes the studio or developer; it is the passion that is poured into the project that helps bring the creation to life. Create your game in Unity, Unreal Engine, MonoGame, Godot, or any other system that will get you there. These are all vehicles that you can use to make your indie game dreams come true.

Thank You for coming by and checking out this article, if you found it useful please feel free to give a “shout out” of the post on your favorite social media tool. Feel free to check out MonoGame and check them out on twitter at @MonoGameTeam.



Recent Content