New Game: Gravity Game

Update 8: Deterministic Role Assignment

Hey everyone! It’s been a while, and there are LOTS of features to update you on!

Last Thursday I did a live stream with Jon to discuss the game and share its progress. However, at the time of that live stream as I was continuing to add features to the game the code was getting more and more buggy, to a point where I wasn’t sure how to fix it. Additionally, after the live stream Jon and I did a bit of brainstorming on the game and came up with a new idea for how the roles of all the different pieces could be assigned.

Fixing Gravity
With a new direction in mind, it was time for a fresh start on the code. My method of assigning internal gravity was too costly, requiring 5 of the 6 bits for communication, leaving only 1 bit to pass along messages such as where the treasure was tumbling. However, @bigjosh had posted his own take on solving this problem of internal gravity in the post Example showing how to establish a global direction in a group of blinks. This solution is so much more elegant, so I used it as the new foundation for gravity in my game, leaving me now with 3 bits to communicate other messages.

Deterministic Role Assignment
Another problem with the game as it was, is that the pieces randomly changed their roles every time treasure fell through them. Though this made for a challenging game, it didn’t make for a great toy, because every time you set a successful tumble path up it would only work once. (Toy vs. Game has been an important thing to balance throughout this process, just something worth noting).

But then the thought occurred that maybe roles could be assigned depending on how many blinks surrounded each blink. This would mean that no matter how you set up the blinks, there will always be a path leading to the bottom, the trick is now creating formations that favor your bucket vs your opponents. I find this super interesting to play around with, and it reminds me a bit of that great new game Townscaper by Oskar Stalberg (definitely check it out if you haven’t heard of it).

By adding this feature, I don’t know if Treasure Tumble is fully a game anymore, but I do think it’s more fun to play with.

Final Thoughts
You can pull the current version of Treasure Tumble here and give it a play around with.


All the features are there, the buckets are a little buggy and need some adjusting that I’ll get to shortly, but everything should work.

My next challenge is I’d of course love to add a couple more animations and such just to give the game some final polish, but I’m currently at 98% storage space, so if any eagle-eyed programmers see any easy ways to cut down on size, I’d really appreciate your help!

Thank you all for following along, would love any thoughts or feedback, and happy Treasure Tumbling!

1 Like