Big Money
I'm a bit late posting about this but back in November at the MEGA+MIGS festival here in Montreal Blabyrinth won another award, for Innovation! And to my surprise it came with some money which was presented as a GIANT NOVELTY CHEQUE! Thank you so much to MEGA+MIGS and Ville de Montréal (the award sponsor)! ❤️
Not quite Blabyrinth
I was hoping to have a Blabyrinth beta ready for Christmas but it didn't happen. I'm eager for people to play but it doesn't make sense to push it out before it's ready or the feedback I get won't be as useful. Don't worry, you'll hear about it when the beta is ready.
I did make some progress on cleaning up some core systems, and I'm halfway through adding a new low-level system to make the game feel snappier called "Client-side Prediction". I might be using this term slightly wrong but it's close enough.
Client-side Prediction
In networked multiplayer games like this if the network connection isn't fast or consistent enough then there will be a delay between touching the screen and seeing a result (like your character moving). It's usually only a few milliseconds but if it gets longer then it becomes noticeable and frustrating. This is generally known as "lag" or "high latency".
In Spaceteam lag doesn't really matter because everything is so chaotic and you don't know what the other players are doing. Also Spaceteam sends very little data. So I got away with it. But Blabyrinth sends more data on the network and you can see more of what's going on so delays are more obvious.
Blabyrinth and Spaceteam use a "Client/Server" network architecture (as opposed to "Peer-to-Peer"). This means that one player's device (the Server) is more important than the others and considered to have authority over the game state. When you tap on the screen in Blabyrinth your character won't actually move to that spot until the Server gives you permission to move. The sequence of events looks like this:
- 👉 Player taps on floor
- ... Player's device (the Client) sends message to Server that we want to move
- ... Server decides if the move is allowed
- ... Server sends message back to Client that the move is allowed
- 🚶Character moves to tapped position
If the delay from steps 2–4 is more than half a second then the game feels sluggish, or the player doesn't think the tap was recognized so they tap again which can be confusing if the second tap does something else. So to improve this I'm changing it so that the character moves immediately after the tap, before getting permission from the Server. The Client is "predicting" how the Server will respond (hence Client-side Prediction).
Here's what happens now:
- 👉 Player taps on floor
- 🚶Character moves to tapped position ( ⬅ prediction! )
- ... Client sends message to Server
- ... Server decides if player can move
- ... Server sends message back to Client
- ✅ if the move was allowed: Great! We saved some time.
- ❌ if the move was not allowed: FIX IT!
The complicated part is the "FIX IT" step. It means the character moved when they weren't supposed to and so we need to quickly move them back to their previous position. This can look awkward depending on the situation. For example, the character is supposed to be trapped in a cage but they start to move through the bars and then quickly snap back inside.
Luckily the client predictions are usually accurate. Even though the clients aren't the authority, they still know most of the game state so they can make very educated guesses. And the occasional glitchy movement is a small price to pay for a responsive interface with immediate feedback.
I used character movement as the example here but this Client-side Prediction change also applies to other actions in the game that have to wait for Server confirmation. It's a broad change that touches lots of code which is why I was waiting until after all the festival demos to do it.
Spaceteam Android crash
The latest version of Spaceteam (2.8) on Android is causing some issues on startup. I haven't figured out what's causing the crash yet but if you go into App Settings (in system settings) and clear the cache and data for Spaceteam it should work again.
Mailing List Transition
I talked about wearing many hats in my last post. Here are some more hats! I would love to spend all of my time doing design & programming but I also have to maintain my mailing list, website, blog, and forum. I used to use MailChimp for sending newsletters but it's getting very expensive now that I have more than 2000 subscribers (> $100/month) so I needed to find a replacement. I finally decided on Sendy, which is self-hosted for a one-time fee of $59 (plus a $5/month DigitalOcean droplet that I'm also using for other things).
It took me a few days to get it running properly because I had to find another way of generating nice HTML emails (I settled on Topol.io) and then figure out how to personalize the messages with member-specific IDs, rewards, etc.
I finally got it working, so that's one less thing to worry about, but the time spent doing little things like this all adds up.
Is the Hype real?
Another task taking me away from Blabyrinth is a potential opportunity with the folks at Hype Labs to use their mesh networking system (called the Hype SDK). If it works for my needs it will solve a lot of my networking issues and I can rest easy knowing that a team of experts is maintaining and improving this technology so I don't have to. This is one hat I will gladly give to someone else.
I'm hoping it will work fine for Spaceteam and Blabyrinth but they don't have a Unity plugin for Hype yet so in order to test it properly I have to build one myself (for iOS and Android). I'm in the process of doing this, and I'll soon find out if it's worth it!
~ Henry