Designer Derek Yu and his indie development team Mossmouth released Spelunky as PC freeware way back in December 2008. The version I played is an updated version for Xbox 360, which released July 2012. In Spelunky you control a spelunker and explore mines filled with treasure and laden with dangerous creatures, rescuing damsels and encountering secret after secret along the way. You enter at the top of a level and must maneuver your way to an exit at the bottom using bombs, ropes, and a whip to get around killer snakes, spike pits, and other obstacles.
It is a deceptively short game, consisting of 16 levels. After working your way down four caves, there are four jungle levels, then four icy caverns, and then four Egypt-esque temple levels. Number of levels aside, Spelunky is ruthlessly difficult. You begin with only three hearts. These can be lost one at a time by touching one of more than 50 “monsters,” or all at once by succumbing to one of many traps. Hardly comforting, a heart can only be earned by finding a damsel and carrying it to the exit. When you lose your last heart, whether you’re on level 2 or level 15, it’s game over—back to level 1. It is brutal.
Procedurally Generated Level Design…What?
This is where that math bit becomes relevant. Like Braid, the indie game I looked at last week, Spelunky is a 2D platformer. But to describe it as just that would be an injustice. It is also a roguelike, a sub-genre of games characterized by randomized levels and permanent death. Yu used scramble-my-brains complicated mathematical algorithms to achieve procedural level generation. In layman’s terms, math made it so Spelunky players will never encounter the same level layout twice.
This makes it easier to not throw your controller out a window when you play for hours and still can’t get past the mines, but it also (accidentally) creates situations that tempt the adventurous spirit inside of you. These situations are a constant. You will always be considering whether getting item X is worth taking a more dangerous route, or whether item Y is worth using one of your four bombs to clear the way.
Take my first run for example. I’m good at Spelunky, so I made it to the fourth level of the mines no problem. I held my left analog stick down to shift the camera downward a few spaces so I could see what I’d be running into soon. A dark opening in the bottom middle of the screen signaled the exit, the portal from the fourth level of the mines to the first level of the jungle. I had an unobstructed route to the exit, but now I saw a gold key, too. The key opens a treasure chest within the level, but a vet like me knows that carrying the key from the mines to the entrance of the Temple, the fourth set of levels, creates a permanent shortcut there.
I was rusty, but I thought I was playing patiently enough to try the latter. I didn’t need treasure, I wanted the shortcut. Like a cruel joke, a poignant reminder of how important patience and close observation is while playing Spelunky, I approached the gold key but was stopped just short. A patterned silver block shot an arrow at me. The pattern signals that it’s an arrow trap, but only the pattern distinguishes it from numerous other silver blocks. I overlooked that detail.
It took my last two hearts. Game over.
I’ll try again right now. And tomorrow I’ll write more about the hidden nooks and crannies of Spelunky, including how the game’s random level design exponentially increases the difficulty in uncovering its secrets.