MoreBlocks Mod and MonoGame Port

Check here for official announcements about the game.

MoreBlocks Mod and MonoGame Port

Postby MrBenjammin » Wed Mar 30, 2016 6:14 pm

Hey guys, I've just added the MoreBlocks mod to Community 1.

MoreBlocks adds a bunch of extra decorative blocks and alternative materials for existing blocks types. You can check out the mod page here and even contribute to it if you want(there's also a list of all the contributors there so be sure to thank them). There's also a thread on the forums for it. It's really cool to see players adding new stuff via mods. You can also grab it and install it to your own servers. Thank you to everyone who contributed or will in the future contribute to this mod. It's pretty cool! Just as a side note, some of the blocks might be replaced over time by Vanilla equivalents as some of the blocks in the mod are planned in the game. So just be aware of that.

Here's a list of some of the blocks you'll see on the server due to this mod:
  • Decking: Steel, Copper, Titanium, Iron, White Carpet
  • Platform: Titanium, Steel, Iron, Copper
  • Railings: Titanium, Iron
  • Steps (lower): Titanium, Steel, Iron, Copper, Glass, Hard Glass
  • Steps (upper): Titanium, Steel, Iron, Copper, Glass, Hard Glass
  • Struts: Titanium, Steel, Iron
  • Doors: Steel, Wood, Titanium, Iron
  • Wall tiles: Titanium, Steel, Iron, Copper, Wood
  • Hatch: Titanium, Steel, Iron, Copper, Wood
  • Shutters: Titanium, Iron, Copper
  • Wedges: Copper Strut, Iron Strut, Steel Strut, Titanium Strut

MonoGame Port
Over past few weeks I've been working on a experimental port of Sky Nations client to MonoGame. MonoGame is essentially the modern and open source successor to the API Sky Nations uses which is XNA. XNA became unsupported in around 2013-2014 by Microsoft but over time it's served us well. It's what I learned to make 3D games in and provided a good abstraction to rendering, sound and content loading that other APIS and engines provide a much less flexible alternative for. But it's showing its age now and some parts of it are just plain limiting in 2016 and the benefits are too big to ignore MonoGame now. Recently MonoGame released their 3.5 version, which basically has all the features Sky Nations required of XNA that were missing in MonoGame's previous releases(such as instanced rendering).

The main benefits for Sky Nations are a release from a 32bit prison and a much faster rendering abstraction. XNA only has 32bit binaries, which means we can only address about 1.5GB of memory, no matter how much RAM your PC has installed. For a game about building, this is problematic but we've managed. You may of noticed the odd OutOfMemory exception mostly when alt-tabbing, the game has to rebuild the chunks(32x32x32 block groups) when this happens as they are discarded from video memory, this caused it to tip toe over this memory limit quite often as this is a significant amount of data. This also happened in other places in-game and has been annoyance across the board, especially since PC's now have a lot more than 1.5GB of RAM. MonoGame supports 64bit, which means we can spread our wings and consume more memory. As much as the hardware allows. While I don't plan on huge extra memory use, this helps stability with above issues a lot. Especially since most PC's now are 64bit and have 4gb of memory at least.

As stated above, rendering(drawing objects to screen) is also a whole lot faster in MonoGame. This due to a few reasons:
  • MonoGame's abstraction of rendering API's is much better.
  • Modern Shader compilers are a lot better at optimizing shaders. In fact it optimized things I didn't realise I wasn't using in some of Sky Nations shaders.
  • MonoGame uses DirectX11 which has some significant performance gains on DirectX9(which XNA uses).
From a basic rendering test of drawing a very dense Capital with 200 or so complex ships as well as buildings on land in both current Sky Nations and the MonoGame port. On my hardware there's a difference of XNA Sky Nations running at 40FPS and the MonoGame port running at about 110FPS for the same area with the same content. This is a pretty big leap!

There's also a lot of gains in terms of stability and upgrades, there's bugs in XNA that I couldn't fix since the source was never available. These bug's don't exist in MonoGame to start with and the bugs I do find may be complex but are fixable, since it's open source and has a pretty big community of contributors. The contributors also keep upgrading and refining MonoGame. Much like a fine wine, it's got better over time.

The MonoGame port won't be released like a normal update, my plan is to make available under the Betas tab in the Properties window for Sky Nations on Steam. Which allows people to switch to it and switch back, so it can be used by a bunch of people to help find any issues. MonoGame is a little different to XNA and there's a lot of changes to the code, they'll probably be a lot smaller things such as an object being red instead of blue. Or a very specific action crashing the game, so it might take some eagle eyes to figure them out. The port won't be available yet, but hopefully within the next week or so. Porting something like Sky Nations isn't easy, there's a lot of code of that does a lot of stuff and I'm currently re-writing some parts that have no alternative in MonoGame such as the character animation. But it's certainly worth it to get all round better performance, easier development and less inbuilt bugs I had no way of tackling. I'll make a news post when it's available in the betas tab.
Developer of Sky Nations
Site Admin
Posts: 904
Joined: Wed Jun 12, 2013 11:13 pm

Return to Announcements

Who is online

Users browsing this forum: No registered users and 2 guests