Okay so Flutter 1.0 landed with a dull thud in the app store. But THAT’S OKAY! It has only encouraged me to make it better.
So I’ve spent the last few weeks adding POWERUPS.
Boy are these fun to play with! More on those soon.
But in the meantime, I was thinking the other day about games and apps and what if you could pull back their skin and see their guts. Like what if you could take a game and strip it of all the design and particle effects and fancy graphics etc. What would be left?
I think it would look like this basically:
These are ODDS. Aren’t they beautiful?
Specifically, these are the odds that specific powerup types will occur depending on our current difficulty level.
You can see from the array setups that there are 8 levels of difficulty (top to bottom), and 11 powerup types (left to right).
At difficulty 0, when a game first starts, the odds are 80% you’ll get a powerup type 0 (the most basic and rudimentary powerup type), and a 20% chance you’ll get a powerup of type 1.
Looking at the numbers feels like peeking into the Matrix to me. I find it fascinating that looking these over you can almost get a kinetic sense of the gameplay. This is the soul of the machine.
As a developer, odds are always top of mind. And of course with something like powerups, this is just the tip of the iceberg. There are other things to consider.
My coding style is pretty verbose. I comment the hell out of stuff to make sure I don’t get confused later. Apparently this is called Literate Programming. Here’s a snippet of comments outlining some of the odds logic at work:
// *** THIS IS WHERE THE MAGIC HAPPENS WHERE WE PICK WHICH POWERUP TO MAKE THIS ***
// need to consider a few things like:
// 1. have we already used this powerup recently? for some powerups that matters a little
// 2. certain powerups should be more prevelant at higher difficulty levels
// 3. of course only pick from powerups that are unlocked/available
// 4. if we *just* unlocked a powerup, we should probably use that one at least once in the following game
// 5. blackopolypse requires a lot of black blocks in the glowboxset
// 6. flutterworks requires a lot of colored blocks in the glowboxset
Isn’t life itself just an infinite array of odds?
Now that’s an odd thought!
Comments (0)