Infinite Cave Diving

spelunky-2013Make no mistake, I hate math. But I appreciate that, on rare occasions, it makes some really cool things possible. Spelunky is one of those things.

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.

This player decided to gamble: “That pile of bones probably won’t be the type that wakes up.” It was. Game over.

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.

2 thoughts on “Infinite Cave Diving

  1. I played Spelunky when it first came out for PC but never beat it because the Keyboard controls drove me crazy. Now that you have me thinking about this game again I might just pick it up for Xbox so I can use a controller.

    • I can’t imagine playing it without a controller. I beat it just recently, after a year of playing it on and off. But I only beat the Temple, not the secret Hell world. I’ll talk about that tomorrow!

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s