Spelunky: a Study in Good Game Design

A while ago we’ve published the article Play Like a Game Designer. Now we’re going to use this material to illustrate how a game breakdown might look like.

For this purpose let’s have a look at one of the most popular games in the genre, the Spelunky game. The sequel is planned for release shortly, and if you’ve never played the original I recommend that you check it out.

This breakdown is structured approximately as follows:

  • the task the developers were facing
  • how that task was accomplished
  • examples and comments

Task: Teach the player the controls

Solution: A tutorial in the form of an introductory level.

This level is presented in the form of travel notes by another traveler. These are the only game levels that are preexisting and do not employ procedural generation. The tutorial introduces the controls and lets the player save a damsel and swipe a golden idol hidden underground.

What’s important here is not what the player learns, but what he does NOT learn — what is not covered. This is considerable, which contributes to the second task: the pleasure of discovering things for oneself.

Task: Leave room for independent discoveries

Solutions:

1.Things not covered by the tutorial let players discover them for themselves. What is not covered:

  • properties of objects and weapons: how they work, damage, limitations, etc.
  • health points: why they are deducted and how much, how they are restored
  • characteristics and behavior of opponents and neutral characters
  • how obstacles and traps work
  • surface properties

2.The properties of individual objects are meant to be discovered independently.

Many objects allow for several usage options. For example, everything that can be lifted can be thrown, and (nearly) everything that hits an opponent causes damage. In other words, practically anything can be used as a throwing weapon.

There are no objects with identical properties in the game (if a thing looks different, it acts differently, and vice versa).

In this picture you see a stone, a pot, an arrow, and a skull.

  • Stone: indestructible object; can be thrown multiple times.
  • Pot: destructible object; can be thrown once or broken using a weapon, which will release either a reward or a small monster.
  • Arrow: indestructible object; appears only after a trap has been sprung.
  • Skull: destructible object; can be thrown once. Some skulls grow into a skeleton when you pass them.

3.Interaction with non-player characters is full of variety and provides opportunities for making many different decisions.

For example, when holding a princess in your arms (whom, as it turns out, need not necessarily be saved), she may be used as a weapon: you can throw her at a snake or a spider to kill it. In some instances she serves as a human shield (when passing under a spider it drops onto the hero from above, and health points are deducted from the lady instead of the hero). Instead of purchasing things from a merchant, you may choose to rob him (the player learns this by throwing a bomb accidentally), and this will have consequences: you will be unable to make purchases until the end of the game, and any merchants will attack you upon sight.

4.Repeat level completion. This lends variety to the player’s experience and allows for trying out different tactics and strategies. It is achieved by game difficulty (see below), and also by the ability to complete levels differently (aggressively or passively, economizing resources or expanding them, and so on; see below).

Task: Challenge the players

Solution:

1.Procedural level generation: levels never repeat, meaning that it is impossible to remember a route and develop tactics for passing a level.

2.Permanent character death (permadeath): each time the game must be begun from square one, at level 1–1.

3.Instant character death is caused by certain types of damage.

4.Difficult-to-restore health points: health levels do not restore between levels. The only way to restore 1 health point is to save a damsel in distress. Of this, naturally, the player is told nothing.

5.Dark levels: certain levels are made dark at random. Visibility is limited to light sources and you have to feel your way around, yet damage sources stay the same.

Subtask: Compensate for difficulty of dark levels

  • At the beginning of the level the player can take a torch to light the way (it can also be thrown at opponents). Here the player may have to choose: if the player entered the level armed, they will have to decide whether to hold on to the weapon or take a torch.
  • Hanging on the walls are unlit torches, which may be lit in order to partially light the surrounding area (earning a few coins).
  • Some stationary obstacles (heads that shoot darts, spiked statues) have glowing eyes. These shed no light, but they do warn of danger.
  • Dark levels generally have fewer opponents and obstacles (my personal impression; this may be an illusion, as nothing is visible).
  • Aside from ordinary opponents, fireflies may be encountered. These are harmless monsters, which like torches partially light up the surrounding area and help navigate.

The player may choose to catch a firefly, thereby earning many coins, but slightly hampering their own movement. Some fireflies fly over pits or spikes, making it risky to attempt to catch them.

6.Distractions befall the player in the form of harmless monsters (for example, mice or frogs). These do no damage and have no effect on the character, but they do cause a distraction, as they move about the screen and stand out against the background. As a result, the player may make extra movements, or lose a weapon, thereby losing health points or essential resources, which weakens them and causes them to lose.

Since the game is difficult, the player quickly becomes frustrated and wants to quit, as there is no sense of progress — you’ve been playing for an hour, but you can’t even pass the first level.

This brings us to the task of getting players to return to the game and the related task of increasing replay value.

Task: Returning players to the game (increasing replay value)

Solution:

1.Shortcut tunnels. Once you’ve reached the second (third, etc.) level you don’t want to keep playing the first, especially considering the difficulty. This could be a barrier for players.

The game lets you build a tunnel that allows you to begin immediately at level 2–1 (3–1, etc.). This will require some effort, however, and completing the level several times.

2.Procedural level generation:

levels never repeat, meaning that you never get bored with the same sequence of events.

Subtask: Introducing variety into level contents

Procedural generation is responsible not just for the form of the levels. Its algorithm also configures content: what opponents you encounter, which traps, and so on. Here’re some examples.

New opponents: as mentioned in the task “Leave room for the pleasure of independent discovery,” the game has no identical objects. This is true of opponents, as well: there are no monsters that look different but have identical characteristics. When entering a new level, practically all the opponents change, and each monster has its own behaviors and armaments, which must be studied and learned.

Examples of opponents (far from exhaustive):

  • (L1) snake: crawls, deducts 1 HP upon contact
  • (L1) snake: crawls, spits venom, deducts 1 HP upon contact, 1 HP when hit with venom
  • (L1) spider: jumps high and near, deducts 1 HP upon contact, can hide in pots or fall from a ceiling if passed under
  • (L2) fire frog: jumps high and far, deducts 1 HP upon contact, explodes after a couple of seconds when killed, becomes an ordinary frog upon entering water
  • (L2) snail: moves slowly, blows bubbles upward that are lethal to the touch
  • (L2) piranha: lives in water, deducts 1 HP upon contact

New traps: whereas at level 1 the most hazardous trap was darts triggered by moving along the same line, at level 2 the most hazardous is spiked pillars triggered when stood against, and at level 3 it is exploding mines.

New surfaces and obstacles: at level 1 (the mines) there are ladders and stone blocks that can be moved. At level 2 (jungles) there are vines and trees (that must be climbed differently), and piranha-infested reservoirs are added. At level 3 (an ice cave) ice appears on which the character slides and that cannot be gripped.

Thus, at each new level new opponents, traps, and obstacles are added, making it almost a new game entirely. The shift is very sudden. Players once again find themselves outside their comfort zone, and everything must be relearned. The game places significant demands on player skill, and this leads us to the next task.

Task: Create conditions for player skill growth

Solution:

1.The Log is a place where the player’s knowledge of the world around him is stored.

The log is not erased when a character dies. It contains descriptions of the items and opponents that the character has used or encountered. The descriptions contain little information; it is a literary text, but it helps remember the general idea.

2.Necessity of completing levels multiple times.

In order to open a tunnel that lets the player begin the game from level 2–1, levels 1–1 through 1–4 must be completed at least three times (the actual number is greater): after the first completion, the player must have at least one bomb left, which must be expended to dig the tunnel. After the second completion they must have at least one rope, and after the third, 10,000 coins. If they do not, the completion does not count.

For the tunnel at level 3–1, two bombs will have to be expended, and so on.

Multiple completion eliminates the possibility of accidental success, and presumes that the player is not merely capable of completing the level, but has also made an effort to reserve the requisite bombs, ropes, or money.

3.New challenges at new levels.

This means that at each level new opponents, obstacles, and traps appear. The player must first study how everything works, then adapt their tactics to the new conditions.

4.Everyone plays by the same rules

  • How opponents and non-player characters behave does not change from one level to the next, and it can be studied by trial and error (of these there are many, guaranteeing game complexity). For example, merchants behave identically when robbed, as do damsels when saved. Monsters likewise follow their own patterns (here the player must study individually which opponents ignore each other and which are hostile).
  • Traps are equally hazardous for everyone. No double standards here: if you toss a monster onto spikes, it will die just like a player character would.

Task: Stimulate different game styles

This task consists of two subtasks, which at first glance appear to be contradictory: to stimulate more cautious and more aggressive playing styles. Simultaneous stimulation of different styles forces the player to make tactical decisions.

Both styles complement each other and help develop gaming skills.

Subtask: Stimulate a more cautios playing style

The death of a character causes progress to be lost: the player returns to the first level with only basic equipment. Memories and log entries are all that remains of previous victories.

A cautious game style lets the player increase their skill by observing the game, monster behavior, traps, etc.

Subtask: Stimulate a faster, less cautious playing style

The game renews at the press of a button when a character dies. Even if the game only lasts one second, the next second it can begin anew.

Equipment, which can be obtained from boxes, bought from a merchant or beaten out of monsters, increases a character’s abilities, which can cause players to overestimate their strength and lead to more aggressive playing.

Some objects (such as a mattock or a jetpack) fundamentally alter the means of moving about the level, which stimulates the player to try new things and make more mistakes. The fact that equipment is generated at random may create a sense of rich rewards (which in turn may encourage a player to try for hard-to-reach boxes, using bombs and ropes, thereby taking greater risks).

When the recommended time is running out to complete the level, a ghost appears.

If the character doesn’t make it to the exit in time, the ghost, which can pass through walls, kills him upon contact.

An aggressive playing style lets the player acquire experience through extensive trial and error.

What to do with all this

And so you’ve amassed a certain number of tasks that the developers were faced with, and examples of how those tasks were resolved. Now it’s time to categorize them. Separate the tasks into different folders, and as you make new choices these folders will gradually fill up.

Take for example the task “Teach the player the controls.” This task must be accomplished one way or another in nearly every game, and this folder will fill up faster than the others. In a little while, you will start to see different ways of accomplishing it: in some cases, special training levels are created, in others, they are worked into a plotline, in still others, new abilities are gradually introduced, and so on. Or no tutorials may be used at all (for example, in the original “Heroes of Might and Magic”). You will probably need subfolders for various genres and various types of solutions.

Breaking down only one game will accomplish hardly anything. You cannot draw conclusions and make recommendations based on a single game.

This is why the article you have just read makes no such recommendations. It was written to illustrate how a breakdown might look.

If you break down two games, these can be compared by the parameters in which you are interested. Naturally, this requires selecting similar games. For example, you could take two fantasy RPGs and compare alchemy systems — how complex they are, or user-friendly, or their graphics, etc. It’s pretty difficult to rate a game element without comparing it to other similar games. In addition, a number of things will escape your attention.

The ideal scenario is to break down a dozen games from a single genre. This will provide you with extensive material for comparison and analysis. In this way, your conclusions will not be made up as you go along but obtained from data, and your recommendations will actually be functional and replicable, instead of being empty phrases like “Amaze your players” or “Watch your dynamics.”

Editors note: This article has been originally published on habr.com in the blog of the Game designer Alexey Shkorkin. Translated and reposted with permission by alconost.com.

We localize apps, games, websites, & software and provide video production, multilingual marketing, & instant translation services. Visit us at alconost.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store