New Game: Gravity Game

Hey everyone! Jacob here with another game idea I’ve been tinkering around with for fun.

Something I’ve been interested in for a bit now is the idea of creating a Blinks game that uses gravity as a mechanic and encourages the player to stack the Blinks on their edges vertically. If this stacking mechanic could be paired with an internal gravity logic so the Blinks know which way is up and down, then I could hopefully create a pretty entertaining physics sandbox if not full-fledged Gravity Game.

Well, I’ve been tinkering and thinkering away and I’ve finally gotten the blinks to a point where the gravity works reliably and intuitively and I wanted to share my progress going forward.

The Goal:
I’m trying to build a marble run/mechanical computer program similar to the Turing Tumble, but this gravity functionality could be applied to lots of games so feel free to hack it however you’d like!

What I Have So Far:

Once the code is loaded onto all your Blinks, they should all be dimly lit with one white face. These are your Wall pieces. Long-press two of your walls until they flash white, then release. They should both now be green. These green Blinks are called Buckets.

Unroll your sushi roll case and place it on a flat surface. This will act as your base for stacking your Blinks up. Put the 2 Buckets on the 2nd and 5th panel of the sushi roll case standing on their edge. Now place any Wall blink between them. The Wall Blink should turn blue with a white face pointing down. Now start stacking Wall Blinks up branching out from the blue Wall Blink in any way you please, the internal gravity should keep the white face on each Wall Blink pointing downwards.

EDIT: In the most recent push, the Gravity Blink no longer turns blue, instead it turns a dim green to match the buckets.

That’s the basic gravity system done. You can move the buckets around to any Wall Blink whenever you’d like, as long as the Buckets are 2 faces apart on the same Wall Blink that Wall Blink will declare gravity.

You can long-press the Buckets again to turn them back into regular Wall pieces.

I’ve also started a basic marble. Single-click any Wall Blink that doesn’t have another Wall Blink directly above it and it will drop a Marble directly downwards. More marble behaviors and ways to redirect it are coming very soon so stay tuned!

What’s Next
This is what I’m planning to add to the game next:

  • Special Wall faces: Marbles will be able to go Left, Right, on a Switcher (alternating left and right), and a Splitter (sending a marble both left and right). (Representing IF, OR, and AND binary logic)

  • Bucket Scoring: Buckets will keep track of either how many marbles have been dropped into them, or have a binary on/off state that switches every time a marble lands in them.

  • Rules for a Game: A marble physics sandbox is fun and all, but I’d love to come up with a strategy game that uses all these mechanics.

Once more of these features are added, theoretically with enough Blinks someone should be able to build a “marble powered” calculator and other really cool demonstrations of binary logic.

Please share your ideas or feedback, thank you for reading and stay tuned for more updates!

4 Likes

Woa awesome! I’ll give this a try later tonight!

1 Like

Update 1: Special Wall Faces
Got this out pretty quick, there might still be some bugs in it. (I also forgot to describe this push but the most recent one on Github should do it)

All the different wall faces are now operational!

Double-Click any Wall Blink to change its function, the functions cycle through in this order:

  • FUNNEL: One white (or lavender) face pointed down. This one’s the default. Any marble entering this piece from any side will funnel down through the bottom.
  • GO LEFT: One cyan face pointed to the left. Any marble entering this piece will be directed to go to the left.
  • GO RIGHT: One purple face pointed to the right. Any marble entering this piece will be directed to go to the right.
  • SWITCHER: Two blue faces pointed either diagonal left or diagonal right. Every time a marble rolls through this, it switches direction to EITHER the left or right.
  • SPLITTER: A cyan face to the left and a purple face to the right. Every time a marble rolls through this, a marble is sent out BOTH the left and right.

Happy marble time! Let me know if you experience any glitches or if you want any other functions to be added.

1 Like

I’m definitely going to be keeping an eye on this project! I have a feeling that these gravity type mechanics are going to be used for some seriously cool games in the future. Way to think outside of the box @JSpamboni ! I’m excited to play around with this once my blinks get in!

3 Likes

Update 2: Buckets now keep score

As of writing this update, the most recent push to the Github should have the buckets keeping score when marbles fall in them.

You can also double-click a Bucket to reset its score.

Coding wise I don’t think it’s the most elegant and there are some situations that don’t work the way I’d like them to…for example right now if two marbles hit a Bucket at the same time the Bucket will only increment by 1. Something to fix for later, but glad to have a basic implementation of it working.

2 Likes

@JSpamboni I got to play around with it a bit last night and had a lot of fun! I don’t really have any suggestions for improvements, but I had a few ideas for features I thought I could toss at you -

  • A smart wall that alternates between left and right on a timer. Might be a fun way to introduce some kind of timing based gameplay down the line?

  • A way to send marbles down continuously. Part of me thought it would be fun to do something like triple click a top blink and just watch marbles continuously drop through the labyrinth :slight_smile:

Just spit balling ideas, I would really like to see how this could turn into a game somehow, but as is it’s still pretty fun to just tinker with!

2 Likes

Update 3: Game Time!

Hey everyone! After a bit of time away and lots of brainstorming, I’ve come up with an idea for a proper game using this gravity mechanic. It’s currently called Treasure Tumble, full instructions have been written up as a readme in the Github and the code has been updated to reflect the rules.

Now you play as competing Archaeologists trying to reconstruct an ancient temple chamber and collect its riches.

This is a very early stage of this game, looking forward to playtesting it with family and figuring out how to make it the best it can possibly be! Would love any feedback or ideas for different rules or features. Cheers!

3 Likes

Awesome! Excited to check it out!

1 Like

Update 4: Playtesting thoughts

I had the chance to playtest the game tonight with my mom and figured I’d post the results and feedback here to better document the process. I’m writing it a bit in my own messy shorthand so apologies if some of it doesn’t make sense.

Graphics:
I should add a flash when treasure falls into the bins to make it very clear that points have been added.
The color scheme also needs some more re-evaluating, the function of each piece wasn’t immediately clear.
The “I am about to drop a piece of treasure” state should maybe not be gravity-dependent, but instead a swirling pattern or something more exciting.
The yellow background should not have rotational symmetry, so it’s clearer which way the piece’s internal gravity is.

Mechanics:
I want to try turning the Go-Left and Go-Right pieces into one piece that doesn’t re-orient with gravity, but rather redirects the ball whichever way it’s pointing. This will allow the player to play with more placement strategies. This piece should also be a different color because it’s not gravity-dependent.
Would any other pieces benefit from not being gravity-dependent? Or are there any other kinds of pieces I could create if gravity didn’t affect their orientation? Maybe a deathtrap piece that only affects specific faces, so you could use it to spite block your opponent?


Gonna try to enact these changes shortly and have an update out soon.

If you playtest and have any feedback or questions please let me know!

Thanks!

3 Likes

Update 5: Some Playtesting Fixes

I was able to implement a bunch of changes based off of last night’s playtesting. I’m excited to give it another try tonight and see if these changes hopefully helped improve the game.

Once again, lots of stuff written here, more for the sake of transparency of process than mandatory reading material.

Here’s a list of all the changes made:

  • Graphics updates: I flipped some colors around so now the pieces of treasure are green (like emeralds) and the mechanisms/redirectors are orange (more closely matching the temple walls). I also made the temple walls dimmer to hopefully boost the contrast overall. Hopefully this makes where the treasure is going to fall even clearer.
  • New Treasure Uncovered Animation: Very basic for now, but when you select a piece to drop a treasure from a piece of treasure spins around the blink’s face. This is good because it’s not orientation specific. I’d like to add more interesting animations like this throughout the game, it’s currently pretty place-holder-y
  • Go_Left and Go_Right are now Go_Side: Go_Side does not reorient itself when put back on the tower, so whichever way you stick it on is pointing the direction the ball will go. Hopefully this makes the gameplay more intuitive. If the Go_Side piece is pointing left or right, the face turns Orange. If it’s pointing another direction, the face turns Purple. A purple face means the ball will fall straight down.
  • Spinner instead of switcher: I wanted the switcher place to also not reorient itself when being added back to the tower, so now it’s been rebranded as a spinner instead of a switcher. Now whenever treasure rolls through it, it will turn clockwise by one face. The switcher piece is only now used between the two treasure bins to keep things fair.

Next things to pay attention to:

  • Add a bit more of a trail or something to make the treasure falling easier to track
  • Game balancing. With fewer features, both the Deathtrap and the splitter piece are likely to spawn more often. I’d like to try a deathtrap that still has some playable faces, so you can reorient it to block your opponent while still having treasure fall through it to your treasure bin.
  • More animations to really make things pop!
  • As with any game, the code is starting to get more full, at some point I gotta go back through and clean things up to make sure everything’s running as smooth as possible.

Thanks for reading and playing! Happy treasure hunting!

Or you can use my custom Blinklib and, right of the bat, save around 400 bytes without changing anything. If you are not using datagrams, you can also disable that for almost 200 bytes extra. To top it all, the full byte is available for face values so instead of 64 possible values (and 6 bits), you get 256 possible values (and all the 8 bits). :slight_smile:

3 Likes

Wow that sounds amazing! I will have to check it out. Those 8 bits would be very very useful

Update 6: Playtesting 2

So I had the chance to playtest the updated game, this time with my father, and wanted to once again list the feedback here. We played several rounds, testing different rules each time and seeing how we liked it.

Currently, the game hits a bit of a strategic wall. Right now each player pretty much always scores 1 point on their turn, so with the goal being to score 5 points it’s fairly predictable that whoever goes first will also win the game (unless they massively screw up). I don’t think that’s very fun, so hopefully these new adjustments will change that.

  • A change to the rules: The game is now played in two phases. First players build the tower, then they drop treasure down into their buckets. Without these two distinct phases, points start getting scored immediately and using cheap tricks that aren’t well earned.
  • Add a treasure spawner: Instead of treasure being able to be spawned from any piece, there should be one or more assigned treasure spawners. And they should only drop when they’re at the top of the tower, so that you can’t stick them next to a bucket and drop all the time.
  • Successful paths should be destroyed: Every time treasure moves across a blink, it should change the direction that blink points. That way setting up successful paths takes more planning, and should stop points from being scored every turn. I think there should be setup turns and payoff turns. This might mean getting rid of Spinners and just making Go_Side pieces randomize after each drop.
  • Add trails and other visual clarity tricks: Right now the treasure falling is pretty “blink and you miss it”. The treasure should probably have a trail, kinda like darkball, that lingers to make the previous path more clear. Also treasure bins should flash when treasure is added to them.

So far the best lesson from playtesting has been sitting down and explaining the rules to my family and realizing how difficult all the different parts have been to explain. I’m looking forward to implementing these improvements so I can simplify the gameplay while enriching the experience. The goal is easy to learn, difficult to master.

2 Likes

Update 7: Added a treasure spawner

Well, that took a bit longer than expected, but I now have a dedicated treasure spawner piece added to the game.

The toughest part was that I wrote all the “gravity logic” for this game like 2 months ago, and I don’t 100% recall what everything does but I know it’s all essential for the game to work and I don’t want to go changing up chunks of it now. Fortunately, I left a fair amount of comments in the code so I could generally retrace my steps. I say all this because the spawner logic had to essentially sit on top of the gravity logic to know when to drop treasure, and so it just took a while to fiddle with the code and get the spawner logic to work. But it does now, so hurrah!

Next up, time to change the Go_Side pieces so that they automatically randomize every time treasure falls through them.

3 Likes

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

Not all of the stuff in the Blinks libraries are “games”, but that doesn’t make them any less fun to play with :slight_smile: The comparison to Townscaper definitely has peaked my interest, that’s a project I’ve been following for a while and I love the zen-like playfulness it seems to create. I’ll give the latest build a try tonight, though I’ll have to try it again once I get 12 blinks!

1 Like

Yes! Please give it a try a let me know what you think. I’m afraid there’s not much that can be done with it with 6 blinks as you need 2 for the buckets and 1 for the spawner, but the basics of the deterministic role assignment should still work :slight_smile:

1 Like

@JSpamboni are the instructions in the README still the same with these changes? I went to try it out last night and tried setting up the buckets with a long press. I got the white flash, but I didn’t get the “Orange with one Yellow face” pattern, instead it sort of stayed a sort of pale green (I think, this was last night and I’m having trouble remembering finer details…). I went ahead and tried setting up the two buckets with a third blink but I got different patterns than mentioned in the instructions.

@jrcwest Hmmm, did you long press the bucket pieces once or twice? Long pressing them once should get you the orange pieces with yellow faces, twice will get you the spawner piece (which is pale green)

Hey @JSpamboni sorry it took so long to get back to you on this, the week got away from me. I pulled the updated build from your repo and tried again this morning and everything seems to be fine! Not sure if it was a bug you found or if I just wasn’t following the instructions properly the first time, but everything seems to be working fine now!

2 Likes