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:
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.
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!
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!
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.
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!
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.