Hi, I'm Henry. In 2012 I quit my job as a programmer at BioWare to spend a year making my own indie games. This blog is about what happened next...

Like Spaceteam? Want to support my work?
Join the Spaceteam Admiral's Club!

Blabyrinth - The First Few Hints

Blabyrinth - The First Few Hints

I've now spent almost a month working full-time on Blabyrinth! This game has felt just out of reach for so long. Getting to work on small snippets was always a treat but now that I'm making actual progress it's having a noticeable (and positive!) effect on my mood.

I'm very aware that Spaceteam still has a bunch of connection issues and is missing Bluetooth. I will remedy those things soon but I also need to focus on finishing a second game so I can keep this little operation running. The Spaceteam tip-jar is still clinking away and the Patreon is getting started, but having more than a single game to rely on is going to help tremendously.

So what progress has been made?

Be aware that everything below uses placeholder art. I found a great set of flexible prototype sprites here that is evocative of the final vision: Oryx 16-bit Fantasy Sprite Set

A lot of the foundational work is getting done.

  • Players can connect and see each other and move around
  • Rooms are connected with passages that can be opened or closed
  • Items can be picked up and dropped and stored in containers
  • Locked doors can be opened with keys Key Unlock
  • Pressure plates can open doors while they are pressed Pressure Plate & Portcullis
  • Scenery can be examined, moved, and manipulated Sliding Boulder
  • Scenery can be touched in a certain sequence to trigger... something Secret Statue Sequence
  • Clues can be split across scraps of paper Torn Parchment Clue
  • Keypads can trigger things with a sequence of button presses Keypad Animals

This is a good example of the extensibility I talked about a couple of posts ago. The keypad in the example uses pictures of animals, but the button labels can just as easily be letters, numbers, astrological symbols, runes, whatever. Or they can be blank and the solution can involve their position on the grid. With a few simple changes similar puzzles can have a very different feel.

And importantly, all these behaviours and actions persist across the network.

Incidentally, my best advice for anyone building a multiplayer game: do not build a single player game and then add multiplayer to it later. Build multiplayer in from the start. Always code as if you are sending and receiving data across a network. It will keep your code better separated and save you a lot of headaches. I (claim to) know this and I still find myself taking shortcuts and making assumptions that I later have to throw away and rewrite to accommodate networking.

~

Next up is the Level Generator. It will begin by generating a random treasure and a secret ritual required to discover it. Clues to the ritual will be distributed throughout the level, themselves hidden in secret places, behind locked doors, or engraved onto scenery. This requires further clues, and then the process continues recursively until the labyrinth is sufficiently complex.

To help with testing I've hooked up my Palette hardware controls to the game. So far I'm just using the slider to zoom the camera in and out of the level so I can see how it has been generated. This feature will not be available to players ;)

I've only just started on the generator but I'm very excited to keep building on this foundation and see where it takes me.

Space out!

~ Henry


Spaceteam is coming to Your Library

Your Library

Every year libraries around the world participate in International Games Day @ your library raising awareness of games and gaming in libraries. Read more about the history of IGD.

This year, on Saturday November 19th, Spaceteam will be one of the official games played in libraries across the planet and I'll also be running an experiment to connect all IGD Spaceteams together through a global event leaderboard.

Here's a sneak peek at what the event page will look like:

Leaderboard Sneak Peek

This is a web page that will be updated in real time to show a ranked leaderboard of every Spaceteam participating in the event, along with some other stats like the total number of sectors travelled. I'm also planning to include a world map showing all the locations where Spaceteam is being played.

Your Events

IGD will be the first official event to use this feature but starting with Spaceteam 2.1 it will be totally open to be used by anyone to run your own Spaceteam events.

Just pick a short Event Code (like "IGD" or "Challenge2016") and tell your participants to use it. Then go to the website (probably leaderboard.spaceteam.ca when it's ready) and enter your code. You'll get a custom leaderboard filtered to only show teams who used that specific code!

Event Settings

This task has a specific deadline (November 19th!) so it has taken precendence over other things but I hope to wrap it up this week and then my next Spaceteam priority is Bluetooth support!

Technical Details

Getting the leaderboards working proved more difficult than I expected. My first plan was to use the built-in Unity Analytics to send a custom event whenever a team finished a game. Then a worker app on Heroku would periodically download the event data through Unity's Raw Data Export system and store it in a database. The web page then queried the database to display the top teams. But there was just too much lag time between sending an event and it showing up on the website.

Next I experimented with a service called PlayFab, and finally settled on GameSparks.

GameSparks has a bunch of useful features that I might be able to use in future games, the only drawback is the potential cost. They have a great "indie" program which is free for up to 100,000 Monthly Active Users (MAU). Well... lucky for me Spaceteam has over 100k MAU. So for now I'm only enabling GameSparks if a player enters an Event Code in the settings. So please don't all do it at once! Just kidding, only a small fraction of Spaceteam players read these posts so there is basically no chance that the numbers will get that high. Use it as much as you want!

Blabyrinth!

In the world of Blabyrinth I'm in the midst of building the engine foundation.

One of the basic concepts in the game is the "level" which consists of a 5x5 grid of rooms (this may change) containing scenery, doors, and items. A level can be hand-crafted or procedurally generated. A level also has rules that determine how doors are unlocked, secret passages opened, and what happens when scenery is interacted with.

A rule might be:

  • if all four players push (swipe) this statue at the same time then it will slide out of the way revealing a hidden item cache
  • if three specific items (eg. a bell, book, and candle) are placed on an altar and certain words are recited then a mystical symbol will appear on the wall
  • if keypad buttons E, N, I, G, M, and A are pressed in sequence then a secret passage will open

These rules are easy to write in code, but I need to design them in such a way that I can easily store them in a database and send them across a network. I also want to support players making new rules for their own levels. JSON is a good format for doing this, partly because it's an easy format for humans to read and write. So I'm making sure that I can store not only the level layout and contents, but also the rules, in JSON. Converting data between different formats like this is called "serialization" and this is what I've been working on recently.

Space out!

~ Henry


Heavy Turbulence

*beep* *boop*

This is your Captain speaking.

We've been going through some rough weather since take-off. If you had seatbelts I would urge you to fasten them, but due to budget issues we had to cut some corners. My sensors are picking up:

  • Install/update problems on Android (error codes -504 and -505)
  • Restore Previous Purchases not working
  • Difficulty connecting to the Waiting Room
  • Crashes at the end of the game (when you crash in Spaceteam you crash in real life...?!)

With version 2.0.2 I think I've fixed the first two issues. I'll investigate the crash next, and the connection issues will continue to improve as CaptainsMess (my networking library) gets better.

I'm also getting messages begging me to bring back Bluetooth. I hear you! I'll bring it back as soon as I can. I've been getting some promising results so far from the Android Bluetooth Multiplayer Unity plugin. iOS might be a bit trickier but I'm sure I'll figure something out.

Other things I've been working on:

Blabyrinth Project Setup

Last week I spent several full days working on Blabyrinth and it felt great. Now that I'm more familiar with Unity I have a much better idea of how to structure everything.

Some of the Unity lessons I've learned from Spaceteam (these may not apply to other games):

  • Force all assets to be stored as text. Otherwise it's very hard to track changes in scenes and prefabs.
  • Use a lot more prefabs, even if the object is only used once. Try to keep the main scene as empty possible. But be very careful with "nested" prefabs.
  • Keep server & client classes totally separate. Never have ambiguity about which data lives where or who has access to what.
  • Put static game data in ScriptableObject classes, not in the scene hierarchy
  • Don't use Unity's built-in Animation Controller for simple 2D and UI animations, use a tweening library instead (like DOTween).
  • I ended up not making good use of PlayMaker, and it was the cause of some of the suspicious Android permissions. For Blabyrinth I'm going to keep my state machines in code.
  • Have an in-game log viewer and debug panel available from the beginning
  • Use more custom editors and property drawers
  • Use more coroutines and enumerators. But be careful about how and when they get cleaned up.

Modular Systems

I'm designing Blabyrinth to be pretty extensible and modular, both for my own sake to manage the scope of the project and also to give it some longevity with later expansions.

I'm breaking systems up into components that I can work on separately, and the scope and complexity of each can change independently:

  • Level Layout Generator — connectivity between rooms, secret passages, major landmark locations, etc.
  • Level Editor — by default the level and puzzles for each game session are procedurally generated. But I also want to support handmade or "curated" levels, allowing for levels made by guest contributors and eventually fan-made levels.
  • Puzzle Generator — locked doors and obstacles, clues, and solutions
  • Mysterious Diagram Generator — certain clues will involve diagrams that contain hidden information and look something like this: https://twitter.com/ebooks_goetia
  • "Riddle" Generator — a system for language-based clues, more on this later...
  • Item Appearances — general purpose items like keys and books will have many variations in style, shape, material, and colour
  • Level Appearances — cosmetic variations in the walls, floors, and scenery
  • Character Appearances
  • Custom Set Pieces — most rooms will be generated from a combination of reusable scenery elements, but there will also be unique special-purpose rooms used in certain situations
  • Character Abilities — each player will have one special ability that allows them to solve certain puzzles that no one else can, ensuring that everyone gets a chance to participate
  • Traps!
  • (Secret systems that I don't want to spoil yet...)

I'll start small and add things to each component as needed. This way I can quickly make a fully playable prototype and then the game will progressively get more varied and interesting from there. But the first step is to make a bare-bones version of each system and get them all working together so I can start testing the game as early as possible. That will be my next major milestone.

Happy Canadian Thanksgiving!

Space out,
- Henry