MonoGame on the GameShell

Microsoft may have stopped development on their XNA Framework, but XNA lives on in the open-source MonoGame and FNA frameworks. (I am going to focus on just MonoGame for this post.)

I have finally come around to testing whether or not the GameShell can run MonoGame and if it is a viable candidate to develop games and applications with.

Turns out it is!

MonoGame runs natively on Windows, but it is also cross-platform as a result of OpenGL and the Mono Project. Essentially, the only prerequisite required to run MonoGame on your GameShell is Mono. The installation is easy enough through the command line.

sudo apt update
sudo apt install mono-devel

(Installation guide for Linux)

Once that finishes all you have to do is run your OpenGL MonoGame project’s exe from the command line as follows.

mono Game.exe

In most cases that should be it! However, what if I told you we could streamline the process even more?

Cue OS v0.5’s new Warehouse functionality!

Yes that is right we can get a MonoGame project up and running on the GameShell without having to use the command line. This is without a doubt more convenient in general, and ideal for those of you unable to ssh into your GameShell.

I have not perfected the process just yet, but if any of this interests you, make sure to check out our warehouse repository for an example of the implementation.

(The “MorroTest” entry is what you are looking for.)

Essentially all I did was compile Mono from source on the GameShell, exactly as described here, removed most of the unnecessary libraries and documentation, and I was left with a folder with the bare minimum binaries to get a MonoGame OpenGL project to run.

This particular folder is really what you need to get your own MonoGame warehouse entry working!

The game that the test entry runs is a very sloppy port of Quantum Caverns, yet the game runs almost consistently at 60fps even without any optimizations or accommodations for the GameShell. Although, without the experimental LIMA driver enabled, the performance really takes a hit.

I flashed a fresh copy of the latest OS and tried out the warehouse and everything seems to work fine. I still need to do more testing in general, but for now it looks like MonoGame works great on the GameShell! :grin:

(I wonder if this means I can get other XNA games (e.g. Stardew Valley, Celeste, RCRU) playable on the GameShell too. :thinking:)

5 Likes

To add up to this, recently succesfully got Monogame to work on the GS through .NET Core. All you need to do is export for the right architecture and optionally make it self-contained and presto.

4 Likes

Wow that’s great!

I am in the process of migrating my codebase to .NET Core after hearing so many good things about it. Hopefully when I get the time I can test everything out on the GameShell, and write a tutorial on how to get everything working.

3 Likes

How’s the FPS? I know when coding things for phaser/node.js on the gameshell that the FPS takes a massive hit.
60-70 FPS in desktop is something like 22 on the Gameshell

I haven’t done too much testing, but the simple example game I initially tested this project with runs at about 55-60fps.

I think JavaScript is great, but all the overhead involved with what is essentially web development doesn’t seem ideal for GameShell development. I am sure it is possible, but using a compiled language like C# is without a doubt easier.

Javascript is far from ideal for sure.
I look forward to the results of your port.

1 Like