Releasing My First Nez Game for Global Game Jam 2018

Global Game Jam

I've finally released a game made with Nez, Ninja Vanish which came out of participating in Global Game Jam 2018. The theme was Transmission & my concept started on track but skewed slightly away from the theme as I started building it and I was totally okay with that. The initial concept was transmissions that would give you valuable information but also give your opponents equally valuable information. That turned into giving your position away to both you and your opponents in a local multiplayer competitive arena battle game.. about ninjas... who appear, vanish, and slash each other. It's wild and fun and was incredible to work on in an room with 60 devs working on their projects.
Download and play it here! Best enjoyed with 3-4 players.

Quick interview with the jam hosts about 36 hours into the 48 hour game jam

Back to actually releasing the project. As you might expect, there were a few hiccups figuring out a good build/release workflow and making sure people had everything they needed to play the game. Hopefully this will help someone else if they run into similar issues, mostly related to OpenAL and the BadImageFormatExceptions caused by having mismatched dlls.

How to Share a Nez Game

The most basic thing you'll need to do is just build the project with Release configuration & zip the resulting files. Just be sure that if you need to include any other files that are not packed in with the content manager, that you copy these files over as well. For me this was a simple input.json file I often use for basic input mapping for controller/keyboard.

The major "gotcha" I ran into when getting this game running on other people's machines was OpenAL. OpenAL is the audio library used in Nez (maybe in all DesktopGL projects?). You will likely have this installed already if you are doing any audio in Nez. Unfortunately, most people downloading and trying to play your game, will not have this installed. To remedy this all you need to do is include the OpenAL dlls (OpenAL32.dll and wrap_oal.dll) in the zip you package up.

You might expect that the OpenAL32.dll is a 32bit dll, this is not always the case. Both the 32bit and 64bit dlls are called OpenAL32.dll. Great. Also of note, if you install OpenAL it basically just plants these in your System32 and SysWOW64 folders. Because Windows, the System32 folder will house your 64bit dll and SysWOW64 will house your 32bit dll. Be sure you package the 32bit dll in. If you are accidentally packing in the x64 dll that you mistakenly grabbed from System32 thinking that OpenAL32.dll in System32 folder would be x86, you will get an error the second you try to play any audio. If you have no error catching at this level, basically everything will just crash with no warning. If you do trap the error you will see its a BadImageFormatException, which basically means you have a mismatch in dll vs target os versions. For Nez specifically it likely means you have an x64 dll when you shouldn't. Be sure to grab both OpenAL32.dll and wrap_oal.dll from the SysWOW64 folder, which obviously would have x86 dlls in it, duh.

Applying this Outside Jams

For future projects I will probably want to setup some sort of actual build process. Likely a batch file that will run MSBuild in release mode, copy the other files I need in (input.json and the OpenAL dlls), and zip this all up with an appropriate name. For the jam, I was just manually making sure the right files were in release and zipping them myself.

It's also important to note, with the zipped files a user could be missing something crucial such as the a required .NET framework version. From minor testing, it seemed as though the game ran fine on both Win7 and Win10 so maybe it's not overly concerning, but it may be possible. I think a user would have to either be running an even older version of Windows which never added any .NET versions that would work for us, or they would have had to remove .NET stuff specifically. To fix this, we could create a click once installer, but I'll probably never go down that route if I can avoid it.

Hopefully this helps at least one person deal with the same problems I had. Regarless, check out Ninja Vanish, my GGJ18 game, here!