The Fractal Roguelike

Back in 2013, I wrote a post about Spelunky HD and its demonstration of “rule horizons,” a concept I described as “expanding layers of complexity that radiate from a central core ruleset.” Like many games that strike a delicate balance between simplicity and depth, Spelunky expands with the player’s expertise. For the casual player, it’s a cartoonish platformer with destructible terrain, obtuse mysteries, and a comical ecology of physics interactions. Place a bomb too close to a lava pool and you’ll trigger a cascade of magma that wreaks havoc as its spills through the cave network, burning ropes, destroying shops, and blocking your path to an exit. For the expert player, Spelunky‘s bewildering entropies cohere into a clockwork of intelligible mechanisms that you play with a choreography of practiced strategies, calculated feints, and minute improvisations. It’s so fitting that Spelunky is a game about perpetually descending into a network of procedurally-generated caves, because both literally and metaphorically, it’s a game of layers.

When Spelunky HD‘s sequel, Spelunky 2, released in September 2020, I was surprised by its structural resonance with the original. In HD, the game’s mainline path led players through a sequence of biomes (the Mines, the Jungle, the Ice Caverns, and the Temple) culminating in a showdown with Olmec, a truck-sized golden head that borrowed its name and likeness from an ancient Mesoamerican civilization. Players who further explored HD‘s depths found thematic sub-levels like The Worm and The Mothership that offered unique challenges, enemies, and items. Expert completion of HD meant conquering the final hidden world, Hell, after completing an arcane sequence of puzzles and sub-goals, including riding Olmec into a death cauldron of lava and using him as a makeshift platform that slowly sinks your character into alignment with a secret door. 

Spelunky 2 replicates its forbear’s structures and procedures like a classical leitmotif. Every aspect of the game is built on theme and variation. The Mines are now the Dwelling, updated with new enemies, terrain structures, and, most significantly, a branching exit. Players may follow the familiar path to the Jungle or opt for the boiling depths of Volcana. There’s a second branch in Olmec’s Lair—one door leads to the Temple of Anubis, a rework of HD‘s Temple, and another leads to the all-new Tide Pool area. The majority of HD‘s items reappear, some with minor re-workings, alongside a new inventory of weapons and resources. Likewise, all of HD‘s secondary mechanics, like the sacrificial altars and sentient health potions, i.e., damsels, are present.

What’s clever about Spelunky 2‘s theme and variation is how it both rewards and defies veteran players’ expectations. Olmec’s Lair, for instance, appears two worlds sooner than it did in HD and without the Temple as its logical preface. Likewise, the Olmec fight appears to be a reprise of the original. Similar to the final Bowser encounter in Super Mario Bros. 3, Olmec hurls itself skyward when the player gets into close proximity, then snaps into position and slams downward if the player attempts to pass below. This action pulverizes the line of blocks directly beneath Olmec’s attack. Repeat this action multiple times and Olmec will eventually break through the first layer of tiles and plummet into the void below. Aside from some graphical updates and minor tweaks to Olmec’s attack pattern, the fight feels comfortably familiar.

The Spelunky 2 Olmec fight (source: ign.com)

So familiar, in fact, that veteran HD players likely think, “Ah, Olmec has plunged into lava to reveal the door to Hell.” But that’s not the case. Instead, Olmec and player drop to a secondary layer of blocks, seemingly identical to the first. Here, you can opt out of the Olmec fight by running right, pushing a block aside, and entering the door to the Tide Pool. However, if you linger in this area, Olmec suddenly and surprisingly levitates, patrolling the airspace above. This behavior initiates a second phase of the Olmec fight, wherein the head opens to reveal a core of alien machinery. Olmec now rains down bombs in sets of six, chipping away at the second layer as you try to shatter the glass domes that keep Olmec aloft. Survive this fight and you’ll drop to yet another layer revealing yet another door, this time leading to the Temple of Anubis. If you choose to stall further, you now face a third phase of attacks wherein Olmec returns to its stomping pattern while ejecting aliens that pilot explosive flying saucers. Burrowing through this third layer reveals a substrate of lava and—finally!?—the doors to Hell. But no—riding Olmec into the lava and entering a door deposits you in the Lair’s back layer, which you must ascend to claim the Ankh, a key item for unlocking the remainder of the game’s mysteries. Despite the familiarity of the scenario, Olmec’s Lair contains no path to Hell.

Bait-and-switch moments like this abound in Spelunky 2. The jetpack, HD‘s most coveted conveyance, is still highly effective, but now also highly combustible. Hell still exists, but it’s a single, vampire-infested room buried in the depths of Volcana. The Ice Caves are now a singular ice cave, and the Mothership is hidden along the bottom boundary of its abyss. (Likewise, the Ice Caves’ Ankh sacrifice is now displaced to two separate worlds.) Instead of getting swallowed by and fighting through the Worm, you can now enter the maws and digestive tracts of giant frogs. King Yama, HD‘s screen-sized final boss waiting at Hell’s conclusion, now reigns as the peaceful Eggplant King (a nod to one of the prior game’s most difficult achievements). The Black Market, once a site of mandatory shopkeeper massacre en route to Hell, is now better handled peacefully. And as for those surly shopkeepers, they will now forgive you if you constrain your crimes to petty larceny.

What strikes me about Spelunky 2’s design is not that it recapitulates its forebears. True to its name, Spelunky HD (2012) was already a high-definition remake and remix of its progenitor, Spelunky (2008). And plenty of videogames revisit familiar locales, characters, themes, and mechanics in their sequels. In fact, it’s harder to find examples of games whose sequels aren’t hewn from their predecessor’s mechanical foundations. (Ask anyone who remembers how jarring the transition from the NES’s Legend of Zelda to Zelda II was.) Rather, it’s Spelunky 2‘s fractal structure that I find so intriguing. 

Appending a “2” to the title self-consciously designates the game as a sequel, and Spelunky 2‘s narrative patina justifies it as such. The game’s default character, Ana Spelunky, is the daughter of HD‘s default protagonist, Guy Spelunky, and Tina Flan, one of HD‘s unlockable characters. Ana boards a spaceship to the moon in search for her missing parents, eventually rescuing them and adding them to the cadre of playable characters who can then relive their own prior adventures. This setup semi-logically explains the recurrence and re-contextualization of familiar faces and spaces, but it’s best not to think too hard about Spelunky‘s story and lore. Spelunky 2 is less a continuation of Spelunky HD than it is a superimposition. The sequel contains, elaborates, and supplants the entirety of its predecessor, just as HD does the same to its predecessor. Its layers are itself.

Fractal design has precedents in earlier videogames. One of my favorites is Donkey Kong (1994), Nintendo’s “covert” sequel of the 1981 arcade game of the same name. The game’s first four levels mimic those found in the original, but they are a temporary ruse to mask a rather deep and mechanically-sophisticated series of puzzle-platforming levels that radically diverge from the jumping, climbing, and hammering found in the arcade original. Mario has far more mechanical capabilities in DK’94 than he did in Donkey Kong, and the game teaches the player these movements over the course of 99 levels. But all of Mario’s moves are available from the start of the game, so if you’re already in on the fractal reveal, you can use these moves to breeze through the first four original Donkey Kong levels. It’s a smart reward for returning players; instead of burdening them by forcing them to replay old levels, the game rewards player foreknowledge by letting them master—and even trivialize—the sequel’s predecessor. It’s like a New Game+ without the fuss of completing the game.

When I asked folks on Twitter if they knew of other games with fractal structures, I got several interesting answers, including Golden Sun/Golden Sun: The Lost Age, SSX/SSX Tricky, Castlevania/Castlevania: Symphony of the Night, The Legend of Zelda/Oracle of Seasons, Receiver/Receiver 2, and The Baker of Shireton/The Cursèd Pickle of Shireton. The range of titles shows that fractal structures aren’t bound to a specific genre or style of play. But there’s something about Spelunky 2‘s particular spin on roguelikes that helps reinforce the fractal structure. And, fittingly, this reinforcement isn’t apparent until the game reveals its final rule horizon.

In terms of secrecy and difficulty, Spelunky 2‘s closest Hell equivalent is the Cosmic Ocean. Accessing this hidden area requires the player to perform an incredibly demanding chain of tasks, including transporting a unique bow from early in the game, pairing it with a unique arrow found late in the game, then using the bow to fire the arrow into the eye of Hundun, the game’s final boss. Doing so allows the player to jump into a nebular vortex that transports them to the Cosmic Ocean, a 99-level gauntlet (à la DK’94) of procedurally-generated levels based on the game’s primary biomes.

Cosmic Ocean’s objectives differ significantly from the core game. Instead of plunging ever downward through the progression of standard levels in pursuit of items that will hasten you to the final boss, you must navigate a randomized biome floating in “infinite” space. Gravity still operates as before, but falling through the level’s bottom wraps you back to the top (and likewise for horizontal movement). Much like early arcade games, the Cosmic Ocean plots Spelunky 2‘s spatial coordinates on a sphere instead of a plane. You still aim for each level’s exit, but the door is blocked by a large Celestial Jelly. And the Jelly doesn’t budge until the player locates and destroys three celestial orbs. Once destroyed, the Jelly awakens and pursues the player.

The net effect is a distillation of Spelunky 2 to its mechanical core. Pure survival is the game here, anchored to both a mastery of Spelunky‘s interlocking verbs and anticipation of their subversion. The game still plays the same, but your progression is essentially frozen. You can still collect resources from crates, but there are no shops, altars, damsels, or other means to collect new items. There is no cure for poison or curses. Farming for high scores is more difficult, too, since the Ghost no longer arrives at the three-minute mark, eliminating your ability to transmute gems into diamonds. The wraparound space amplifies the idiosyncrasies of enemy movement. A foe that could be safely forgotten in a standard level might now fall through the bottom of the level, only to damage you with an airborne attack seconds later. 

Spelunky 2 is a fractal of Spelunky HD, which is a fractal of Spelunky. But the Cosmic Ocean is a fractal of roguelikes as a genre. The multi-level gauntlet sands away the game’s sequential progression and narrative structure, leaving behind a polished sphere of the roguelike itself. Just as Spelunky 2 reconfigures HD as a prelude to its own expansion, the Cosmic Ocean reconfigures Spelunky 2‘s core game as a prelude to the archetype of its own genre structure. It’s a game of layers, all the way down.