Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
October 24, 2016
arrowPress Releases

If you enjoy reading this site, you might also want to check out these UBM Tech sites:

EXPLORER.GMK: An Excerpt From the Spelunky Book
by Derek Yu on 03/23/16 01:46:00 pm   Expert Blogs   Featured Blogs

7 comments Share on Twitter Share on Facebook    RSS

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.


Spelunky Book CoverFor the past year and a half, I've been writing a book about Spelunky for Boss Fight Books. From the start, I knew I wanted to talk about more than just the development history of Spelunky and also use the opportunity to delve into game design and creativity in general. Strangely enough, I rarely have a full picture of my work at the time of its release, so writing a book about my own game still required quite a bit of research, revisiting my old emails and forum threads and reading what other people had written in the meantime. Slowly but surely, I pieced together a clearer understanding of my own design decisions that I could put into words!

Several drafts and many edits later, with the help of an incredible group of editors and readers, the book is finally out and can be ordered here as a paperback or eBook. Thanks to everyone who made it possible and I hope that game enthusiasts and game developers alike can get something useful from it!

Below is an excerpt from the book, a chapter called "EXPLORER.GMK" that discusses the very earliest build of Spelunky, the core elements of the game, the importance of themes, and the relationship between artists and their influences.

The earliest build I kept of Spelunky is from June 29, 2008 and has the tantalizingly nondescript filename of “EXPLORER.GMK.” Opening it up now in Game Maker, I notice that the protagonist, Spelunky Guy, looks slightly different from his current form—the brim of his trademark “fedora with a miner’s lamp attached to it” is a pixel shorter on either side, making it look more like typical caver’s helmet, and the two pixels of dark brown hair that delineates his ear from the rest of his head is missing, along with a pixel of shading on one of his hands. On a small sprite that is only 16x16 pixels wide, these small changes are jarring. I also see remnants of the older platformer prototypes still in the project, just like relics of ancient civilizations. There’s a slime, goblin, brigand, and gargoyle from one prototype and a missile sprite, robotic spider enemy, and empty room (named “rWestTower2”) from another.

Otherwise, this build of Spelunky, though it only features a single level with bats, spikes, and arrow traps, looks and feels remarkably close to the final release, a reminder of how quickly the core design came together. Nearly all of the key elements that define Spelunky are present in EXPLORER.GMK. First and foremost are the randomized levels, the big hook of the game. Secondly, even though your basic whip attack is not available, you can pull out a bomb and blow up the walls, creating holes that can send Spelunky Guy falling off the bottom of the level and into the infinite space below.

Destroying the environment is a fairly novel thing to do in video games. In most games, aside from specific set pieces that are meant to be destroyed (for example, a wall with an obvious crack in it), the backgrounds, even windows and wooden fences, are completely impervious. The reason is not only that invincible scenery is an easy way to corral a player along a path, but also that it’s a time-consuming and exacting process to make everything destructible. Destroying a piece of the world requires it to break convincingly, and it also requires that there is something behind it for the player to interact with. That’s one of the reasons why destructible terrain was more common in older titles than in modern, large-scale ones—as the complexity and realism of game worlds increased, so did the difficulty in making them break apart.

If you happened to live in Japan in 1983 and own a Sharp X1 computer, you might have played Kagirinaki Tatakai, an obscure, side-scrolling action game where you control a man equipped with a jetpack, lasers, rockets, and grenades. The most interesting aspect of the game was that almost all of its levels were fully destructible. And while I never played Kagirinaki Tatakai myself, an article about the game nonetheless helped inspire the inclusion of destructible terrain in Spelunky.

In the article, written for the website Hardcore Gaming 101, John Szczepaniak says this:

Adding to the realism is the fact that you can destroy the environment in real-time. Any part of it. All of it. No, seriously. See that floor? If you don't feel like navigating a maze of enemies, just bomb your way through the floor and avoid them. This adds a HUGE tactical layer to the game, since you can bomb holes in the floor and let enemies pop through one at a time to take them out, or avoid them altogether. But since your grenades are finite, and essential to passing later sections, you need to use them carefully.

That sounds pretty cool, doesn’t it? Destructible terrain not only gives the player more agency, making the game more immersive, but it also makes the level generation easier, since the developer can safely generate areas that are walled off. The level generation system I ended up using for Spelunky depends on your inability to access the entire level without destroying the walls.

Another key element that’s present in this early build is Spelunky’s “theme,” which, in game design terms, refers to the setting, story, and imagery that we wrap around the abstract rules and systems. The name Spelunky is a reference to caving, also known as “spelunking.” Originally, it wasn’t intended to be the game’s final name—I just needed a more interesting filename than “explorer” for a preview screenshot I posted online. It was another indie developer, Phil Fish, who made me consider it again when he replied, “Spelunky, huh? I like it.” Looking back, it’s uncertain whether he meant that he liked the name or the screenshot, but I took it as the former.

Thematically, Spelunky comes from a long lineage of stories about rugged heroes hacking their way through thick jungles, exploring ancient ruins, and ultimately defiling the resting places of long-dead native peoples for treasure and glory. The most well-known of these adventurers is Indiana Jones, a character created by George Lucas and Steven Spielberg for a series of four major movies. The first three movies, which came out in the 80s, left a big impression on me, particularly Indiana Jones and the Temple of Doom, with its terrifying traps and gruesome scenes of human sacrifice and chilled monkey brains.

Indiana Jones had a huge impact on video gaming, too. In the same way that Alien influenced science fiction video games like Contra and Metroid, Indiana Jones has inspired digital treasure hunters like Pitfall Harry, Rick Dangerous, Lara Croft, and Nathan Drake. This isn’t surprising when you consider the popularity of Indiana Jones, the influence of movies on video games in general, and the fact that exploring dangerous ruins for fame and fortune has always been a popular theme for video games.

But “Indy” himself was a collection of homages, taking inspiration from James Bond, as well as the movie serials and pulp novels of Lucas and Spielberg’s youth. His look—the fedora, brown jacket, khakis, and shoulder bag—are said to be directly influenced by Harry Steele, played by Charlton Heston in the 1954 adventure serial Secret of the Incas, which was an admitted influence on the first Indiana Jones film, Raiders of the Lost Ark. And his trusty bullwhip? From Zorro, who carried one on his belt and, in the serial Zorro Rides Again, used it to whip a gun out of someone’s hand and swing out of a window. And speaking of Raiders of the Lost Ark, that movie was also inspired by, of all things, the adventuring of the cartoon characters Donald Duck and Scrooge McDuck, of whom Lucas was a huge fan growing up. The iconic boulder trap that Indy barely escapes at the beginning of Lost Ark is very similar to the boulder trap featured in the 1954 Uncle Scrooge comic The Seven Cities of Cibola, penned by Carl Barks. The similarity goes down to the way the trap is triggered—by pulling an idol off of its pedestal.

None of this is to say that Lucas and Spielberg are unoriginal, just that they are part of a long tradition of adventure tales of which Spelunky is also a member. And what they gave back in Indiana Jones is much more than what they borrowed. That’s what makes it Indiana Jones and not a clone of Harry Steele or a Zorro rip-off. Even the borrowing, if it’s done honestly and with genuine respect and love, is a good thing—a way for new audiences to connect with old serials and comics they probably wouldn’t have heard of otherwise. In a way, producing, experiencing, and interacting with art is like participating in a long-running conversation that artists have been having and will keep having in the future.

Themes also act as a sort of lubricant to understanding the rules of a game, bringing abstract concepts to life by tying them to concrete scenarios that humans already understand. Perhaps the best example of this is not a video game, but a board game: chess. Without a doubt, the rules of chess are beautiful on their own, and it’s the rules that make chess such an influential and long-lasting game. But consider if the pawns were not pawns, the knights not knights, the kings and queens not kings and queens, etc., but just abstract shapes of varying sizes. If the military theme of the game was removed entirely, chess would still be an elegant game, but not nearly as compelling. It’s much more exciting to have a knight on a horse leap over a row of pawns to make an attempt on a king’s life than to move a shape from one part of a grid to another. The personification of the chess pieces also makes the rules easier to learn— thinking of the knight piece as a knight on horseback helps me associate it with its leaping movement.

With Spelunky, the caving theme seemed appropriate for a number of reasons. For one thing, I had already decided that the player would be heading downwards toward the exits, since it’s easier to let the player fall than to generate a path they can climb up. Caves, dungeons, and other natural or ruined environments also lend themselves well to video games because they’re easy to mold into levels of almost any shape without looking out of place. This is even more valuable when you’re generating levels algorithmically and can’t anticipate what they’ll look like. While it’s certainly possible to set a game in, say, a pristine office building, the rigidity and repetitiveness of the layout gets boring quickly and places restrictions on how a character can move. Finally, I wanted to give the player special equipment so they could create their own paths, and spelunking tools like rope, bombs, and pickaxes were a natural fit for that.

So long as your theme is consistent with your rules, it doesn’t matter whether it makes perfect sense in real life. On the surface, a story about an Italian-American plumber saving a Mushroom Kingdom from turtles seems surreal and disconnected from reality. But after just a few minutes of playing Super Mario Bros., we start accepting that eating mushrooms makes us grow larger, flowers let us throw fireballs, and stomping on koopas will let us kick their empty shells across the floor. Given how quickly human beings adapt to new situations, I could have easily set Spelunky in a world where you were blowing up cheesecake floors with exploding penguins, but since there was already so much for the player to figure out and so much for me to design, it made sense to start from a setting that both the audience and I recognized. That was the same reasoning I used when I started making platformers with Game Maker: Use the familiar as solid footing to learn something new.

Spelunky was both my easiest development and also most popular project to date, and I believe it’s because the key elements—the theme, the random level generation, and the destructible terrain—work together without friction. Nothing was compromised to make something else fit and each part only boosted the signal of the other parts.

I’m reminded of Shigeru Miyamoto’s definition of a good idea: “A good idea is something that does not solve just one single problem, but rather can solve multiple problems at once.” Once those good ideas were in place, it felt like it was only a matter of plugging in the obvious holes and adding more and more content. New ideas either made sense, fitting into the existing schema with only a little bit of finagling, or they were quickly rejected. In other words, Spelunky began to design itself from an early stage.

Related Jobs

Age of Learning, Inc.
Age of Learning, Inc. — Glendale , California, United States

3D Animator
Booz Allen Hamilton
Booz Allen Hamilton — San Antonio, Texas, United States

Lead Game Developer — mountain view, California, United States

Senior Game Designer
International Game Technology
International Game Technology — Reno, Nevada, United States

Senior Game Artist

Loading Comments

loader image