Procedural generation may be all the rage these days, but it wasn't long ago that most people frankly didn't understand what it was. The key area of confusion was the idea that what was being generated was being done so "randomly". Of course, the whole point of a procedurally generated game is that no two players' experiences are alike, but as our understanding of these curious games grew, so too did our appreciation of why the word "random" belonged nowhere near them. These were still artfully curated experiences - but the art was in designing systems that could be algorithmically reassembled in literally endless entertaining ways, working every time.
The walls are shifting...
If ever there was a game to ram this point home, it is Derek Yu's Spelunky. Originally a lo-fi PC game souped up beautifully for Xbox Live Arcade and then just about every other system ever, Spelunky is a 2D platform game where you control a little explorer descending through mines full of snakes, spiders and traps straight out of Indiana Jones.
Spelunky is procedurally generated, meaning that every element has been designed and then tested repeatedly to refine an algorithm that ensures they are always placed sensibly to create a fun level, however many times you load up the game. The exit will always be roughly at the bottom. There will always be a way down that doesn't require power-ups. Enemies will always be positioned in complex but reasonable layouts.
Getting this right must have required the patience of an entire religion's worth of saints, but Yu and his contributors managed it, resulting in a game that always feels fair, even when you die horribly. Our latest death, for example, involved being set upon by a giant spider. We were trying to kill said spider while lurking on a platform it couldn't reach, but when we delicately dropped a bomb into its path, it simply jumped out of the way, and the resulting explosion had just the right blast radius to remove the ledge suspending us above our enemy, who needn't no further invitation. Fair how? The blast radius was entirely predictable.
Jungle is massive
Part of the thrill of Spelunky, and the reason we're still playing it many years later, is that each element works spectacularly together to create not just endlessly challenging level configurations, but near-constant slapstick. Sometimes you try to set off a trap and accidentally trigger something else and end up juggled into the mouth of a piranha plant. But just as often you fall from a ledge, activating an arrow trap you hadn't seen, and the arrow misses you and takes out the spider that was just about to jump on your head and kill you. These thin margins between brilliance and comic ineptitude never seem to widen, no matter how well you understand the game.
Spelunky may be a masterpiece of procedural design, but it's also surprisingly deep as well. There are four distinct areas of the game you move through in each session - mines, jungle, ice caves and Aztec city. The mines can be challenging, but they're mostly pretty relaxed. Jungle then cranks the difficulty up a huge amount. Ice caves then relaxes a little, before the golden city blows your head off again. But that's not the extent of it. There are also hidden worlds that you may never see, located by using weird combinations of items to do peculiar things. Each solution is the sort of thing you will probably discover by accident if you keep playing the game, and we wouldn't want to spoil them for anyone who hasn't found them.
Most of the depth, though, comes from the ingenious ways systems can play with one another. A good example is the frogs in the jungle. There are red ones and blue ones. The blue ones are annoying - they jump around menacingly and need to be whipped or bounced on to eliminate the threat, which isn't always easy when you're moving through networks of tiki traps and spike pits. But the red ones are even more problematic, because when they reach you, they go into a detonation routine and literally explode. We had gotten used to just running from them on sight, and we got a bit confused one time when we turned round to see a blue frog pursuing us and no sign of our red nemesis. Where had it gone? It turned out it was the same frog. We had jumped through a pool of water in our haste, and water extinguishes fire, so when the frog hit the surface it went from red to blue.
There are a lot of unlockable explorers in Spelunky, and we spent a long time filling out our character selection screen, but the reason we continue to play the game to this day is something that was added a few years ago: Daily Challenge mode.
Daily Challenge is complete genius. It's a competitive mode that allows you to play Spelunky against your friends in separate games at separate times. How can that possibly work? Essentially, the game generates a unique procedural seed each day, then sets it globally for Daily Challenge mode, so every day you load it up you will get the exact same procedurally generated sequence of possible levels as anyone else in the world playing Daily Challenge. Depending on how far you get, you place on a global leaderboard for that day. And so every day is a new opportunity not to land on spikes five seconds into your one possible attempt.
Spelunky has a lot more going for it than we've had room to mention. The soundtrack is the sort of thing you will be humming for years to come, enjoying it afresh every morning. The visual design is a perfect modern-day take on a 16-bit platform game grid. The controls are tight and responsive, with just the right levels of movement speed and inertia. The physics are brilliantly consistent, challenging and sometimes horribly predictable. And the power-ups and enemies are at turns playful, fiendish, awkward and violent.
Mines of moreish
It remains more than enough to keep us going for the long haul, and the fact Spelunky is so modestly programmed and ideal for short sessions means it has gradually made its way onto multiple systems we own, from PC to console to handheld. It feels like there are always too many new things to play these days - always too much fear of missing out to skip this game and always too much on the pile of shame as well - but Spelunky is a constant; a little atom that always explodes into a universe of hilarious genius. It helped clarify our understanding of procedural generation, then, but it's also hard to think of a game that does it better.