I’ve been making a lot of progress on the Spaceteam Unity rebuild but there’s still work left to do. Here’s what it looks like running in the Editor:
I’m frustrated by how long it’s taking because I really want to be working on Blabyrinth, but I’m still confident this was the right decision. I get emails every day about the game not working on various Android devices.
I’m surprised about just how much stuff there is to rebuild. I still think of Spaceteam as a small, “simple” game but it actually grew quite a lot over the last 3 years with all the upgrades, Admiral’s Club additions, new languages, and spin-off projects.
Challenges I’ve encountered:
- Unity’s NetworkLobbyManager reloading the scene when a connection is made. I don’t want this to happen but I haven’t been able to prevent it. When the scene is reloaded various objects get reset/recreated and I have to restore their state in such a way that it looks like nothing happened. It also causes the animation to visibly stutter.
- Publishing an iOS project and then compiling and installing to a real device is slow enough to be very frustrating. At the moment I’m trying to fix problems that only show up on the device and the iteration cycle (change, build, compile, test, repeat) involves so much waiting that it’s very easy to get distracted doing something else.
- Slime effect (+ wiping). This was tricky even in the original game because it involves RenderTextures and custom shaders, but I had to relearn all that stuff in Unity so it was a bit time-consuming.
More C#/Unity Gotchas:
- SyncVar objects seem to need a default constructor, or you’ll get weird errors. My OutfitPiece class had a custom constructor and it took me a while to figure out that simple adding an empty OutfitPiece() constructor made the errors go away.
- To make the dangling panels I naively figured that adding a Hinge Joint to the object would be enough, but I also needed to add a Box Collider (despite not needed collision) or the panel wouldn’t be affected by gravity properly.
- If you want to Join a List
you have to use ToArray() first
- When calling a coroutine from C# you must use StartCoroutine(coroutine) or it will just silently fail! My solution: I’ve been suffixing all my coroutines with “Coroutine” and making one-line helper functions that simply wrap the call.
- If you try to override a function but don’t include the “override” keyword sometimes it will fail silently with no warnings.
- C# does not autoconvert Doubles to Floats. Must always add “f” at the end of floating point values. Mildly annoying.
New Plugins I’m using:
- ZestKit and now DOTween. Many of my animations are dynamic so I needed a programmatic solution for smoothly animating between different states (“tweening”). I started with Prime31’s GoKit/ZestKit but due to lack of good documentation I ended up switching to DOTween.
- Procedural Lightning. I wanted a good shock effect for electric malfunctions, so I found a cool library for lightning bolts. Looks great and very easy to customize.
- QR Code Scanner/Generator for the Admiral’s Club login page. I only used a few bits of code from this library but it got me on the right track.
- Prime31 Etcetera. For showing native iOS and Android dialog boxes.
- TextMesh Pro. I needed a way to modify individual characters in a label (eg. for Labelling Malfunction) and TextMesh Pro seems to have a lot of features. I’m still experimenting with it.
- More Post-Processing Effects. I’m using this for wormhole and anomaly screen distortion effects like rippling and waving.
So it’s going to be a few more weeks of work at least to get the original game done, and then I have to re-port Spaceteam to Apple TV (as a bonus Chromecast/Android TV should now be much easier). Then Spaceteam ESL and the upcoming Spaceteam FSL. Spaceteam Kids is still in the works as well.
Whew! That’s a lot of Spaceteams. I’m trying to stave off the madness by filling in the cracks with some Blabyrinth development.