Tonight I present to you last week’s prototype: Jumping Bean.
Instructions:
- Arrow keys <- and -> will move the bean left and right accordingly.
- Refresh the game’s page to get a new level (each level is created randomly).
- Go here to play.
How this came to be:
Jumping Bean came about as an exercise in creating a procedural 2D platforming game. I still want to come back to this one and create a fun Mexican jumping bean theme for the art . . . “Next time, Gadget . . . Next time!”
I started with two platforms to develop the basic collision between the platforms and my capsule character (gotta love the quick and dirty programmer art). The “bean” has a simple script based on Unity’s built-in FPS Walker script that limits the player to moving in only two dimensions (with the arrow keys) and jumping (with spacebar).
After I felt good about the way the bean was jumping around I created an instantiation script that created a given number of platforms along the x plane. As it created each platform the instantiator would set the platforms length randomly based on a range inputed in the Unity editor and created a gap based on a second range. This gave me a nice line of platforms that varied each time the game was restarted.
I tweaked the gap and platform sizes a bit until I got something that felt pretty good, but realized that the game was still pretty easy. I wanted to add a little challenge so I played with a few different ideas until I hit one where the bean just continually jumped on its own. (To be honest, I was inspired by an iPhone game I’d been shown a while back by my buddy Tom. I don’t remember what the app was called, but it is quite addictive.) This gave me something pretty fun where the player only had control over where the bean jumped but not when it jumped. It also simplified the control scheme, which I’m always a fan of : )
So now I had my jumping bean and a single row of platforms. I wanted to make the levels more interesting so I added two more platform instantiators for a middle and upper row of platforms, too. This made things more interesting to look at and jump around on. I wanted, however, to make the player have to be conscious of where they were jumping, and the game wasn’t doing that quite yet. Plus the player had no reason to be jumping around, so I added . . . duhn duhn DUHN . . . little white dots. MMMMMM.
Since we had something good and yummy to collect, I wanted something bad and not so tasty to avoid. Thus the little red menacing mines were created. Both the dots and the mines were sent to the platform instantiators to decide randomly where to put them, giving the player a different experience each time they reset the game.
This one was a couple/few afternoons of work . . . I have yet to manage a full week on one, but I’m hopeful for the future!
~R
Currently playing: Prince of Persia
Recent Comments