Gamejam Postmortem - Build-Only Issues with New Tech


For this game jam we (us two programmers) decided to implement a bunch of newer Unity tech. We knew it would be risky but we figured a 30 day game jam doing part time would be a great place to try it out. Generally Unity is pretty stable when making builds and things go great, we made the mistake of not making a real build until the final days. In-editor everything worked well enough for a game jam.

Once I started fixing the build-only issues I would discover one issue underneath another, just about all of it is because of some newer tech. Most of these are experimental and the biggest issue that Unity's tech has is packages fighting each other. 

Unity does amazing things and will help you iterate+implement faster than most engines. One of it's strengths also includes the ability to quickly fix it's engine's weaknesses, which is a greater strength than many realize.

Asset Bundles

Asset bundles work fine enough, but they have a lot of edge cases where things will explode. Chicken and egg issues at startup are pretty common, especially with any singletons. Unity's example code typically unloads an asset bundle immediately after loading it, it looks like they are just unloading a loader handle but they are actually unloading the asset data. This was likely the reason for the game booting up the main menu then having a black ui toolkit overlay over the entire game when it loaded the hud.

Asset bundles also have issues with scriptable objects. For anyone who doesn't know what scriptable objects are, they are the best thing ever. They are basically a data asset which is ultra-customizable and always looks good in the editor. You can use them for status effects, attributes, item data, song playlists, loot tables, etc etc.

But the only issue is when these are referenced by asset bundles, "Asset bundles can duplicate scriptable objects" but ONLY IN FULL BUILDS. This meant there were breakpoints where we were comparing two quests that were the same scriptable object but they had completely different hashcodes. But in editor the two scriptable objects had the same hashcode so none of the bugs would be in-editor. It's extremely dangerous when any tech works differently in-editor vs a full build. The workaround for this bug with asset bundles is to store your own hashcode and use that member variable instead. Something we had to implement anyway because NGO doesn't have a great way to pass a reference to a scriptable object over the network.

Network for Game Objects (NGO)

I'll be honest, NGO has room for improvements. I've worked on MMOs, networked phone games and database driven apps before so I know what improvements it could use. It almost feels like unity paused development on NGO to work on networking their dots framework, which isn't great because unity is all about game objects and people launching games now need a solution. 

It took us a while to set things up even though I've done it before. Really this is just lost time with boilerplate setup. LAN support is not included by default which is insane. NGO gave us some issues with nested netobjects which was an easy fix but a weird limitation (specifically network objects with network object children). 

NGO lacks port migration stuff, so you pick a port for your game and you are stuck with it, usually other net stacks will have a range that they'll attempt through. Not a big limitation but can cost some time if you don't know about it, especially if you are running more than one editor on one machine.

NGO lacks an offline mode. I already knew this and accounted for it but anyone who wants to "throw networking" into their project will hit this like a brick wall. If your network manager is offline "Every net object will despawn and every rpc call will fail". The workaround is to always be online but turn off your discoverability and deny all requests, pretty straightforward workaround but this functionality is something you would expect to be part of the code. This issue was in place with mirror networking so I'm not surprised it's still there.

NGO's network object list is outdated. This cost us only a little time but this is something that would be solved by supporting addressables instead of loading basically the entire game at start time.

UI Toolkit (Experimental) (UITK)

We never really used ui toolkit for any game or game jam for that matter so we wanted to try it out. UI toolkit has some great strengths that many devs will appreciate. At the moment of this post I wouldn't recommend it for anyone who needs a sturdy foundation for their game. I've launched several games using UGUI and that is still the king for now. Once UI Toolkit is more polished and battle tested it will quickly take over as the main UI solution for unity, they are even replacing the editor UI with it.

Since UITK uses the same scripting as webdev it was easy to find cool solutions to common problems. It was also really easy to add effects and transitions. Creating menus is very quick once you get the hang of it, it's a rough start to anyone used to UGUI. But it's an easy start for anyone coming from webdev or Unreal.

Currently UITK lacks image-based masks. It isn't a huge deal since there's some workarounds but depending on your game this can pull the e-brake real fast. At the moment it does have 2 workarounds, you can use vector-based masks by making new assets using krita/photoshop/gimp. You can also just use the edge radius if you want a circle, I did this for the minimap and the health because I'm not good at vector drawing in krita yet.

This version of UITK has some issues with Images. It doesn't have the "Image" component listed in the editor, you need to edit your xaml to change a visual element to it. The UI explodes if one of your images using property watch becomes null, or if the object that contains the image becomes null. Honestly I ripped all image property watches out because they didn't seem stable, it is an experimental package after all. Some of the webdev solutions are just not there, be sure to find a compatibility chart before you jump in. Also apparently property watches aren't actually listening for property changes right now, so it doesn't actually give you a performance boost, it just checks every frame. So if you are only jumping into property watches for the perfs you probably shouldn't bother.

UITK's font support isn't fully supported yet. I couldn't get the outlines to work right in the game, comparing it to textmeshpro it just ends up being hard to read. Typically I like to do 0.2 black outline with 0.2 grow so that each letter gets a nice outline all the way around it, in the alpha build I could only get an undershadow to show up which is why the font is hard to read without a black background.

UITK runs differently in full builds compared to editor. This cost the most time of the entire game jam. The issues listed above with UITK won't show errors most of the time, or they may only happen in full builds. The last bug I fixed with the UI was with the pause menu. You could go into the game and play but the pause menu didn't respond. This was because "In full builds the panel settings' asset's sort order seems to override the gameobject UI document sort order." So the HUD was in front of the pause menu, which wouldn't be a big deal considering the whole hud is set to not block clicks, but for some reason that prevented clicks in full builds but not in editor.

Now What?

I want to improve this game and eventually throw it on Steam. Obviously it'll need some bugfixing and some more content, but really the only things I'm nervous about is making sure it's fun and picking a price. I'm thinking somewhere between "Indies should starve" and "I'll wait for a sale". 😛

Funner Games is just side project stuff for me, I hope to start actually launching all these little projects that I keep jumping into. Nevereth may be our first big launch or another game may be. In the meantime enjoy this list of things we want to add for the full release.

  • All bugs fixed (I wish)
  • Caves and secret areas
  • More NPCs than just one, extra NPCs would have side quests
  • Initially I was going to make the students portal in and go to class and "sit" in their chairs but I scrapped that for the game jam.
  • Day cycle - We don't want to force players to go to sleep but we need a day cycle for the students.
  • More crops, enemies, critters.
  • Background critters - Imagine little birds with their miniature sticks and platforms gracefully flying around and landing on random spots
  • Different player models for players
  • Combat Progression - Skills, learn spells by actually going to class
  • Exploration Progression - Find cool things to make you better at finding cool things.
  • Farming Progression - Maybe you plant better seeds, some grafting crafting?
  • Join via join code - Using unity relay because not everyone is on the same LAN. This one I'll update the gamejam build with at some point.


Will Teixeira - CEO of Funner Games

Files

Nevereth_0_1_2.zip 280 MB
55 days ago

Get Nevereth

Leave a comment

Log in with itch.io to leave a comment.