◀ 7.47.57.6 ▶

7.5 — Design a Big Cave: Flow & Difficulty

You have a set of tools, and it is a smaller set than you think. Be honest about it before you design with it: you own tiles, a player who can jump, an enemy, a turret, a spike, a coin, a lever, a ladder you built yourself, and one exit back to the hub. That is enough for a whole cave. Today: zero code. You learn to read a level like a designer, sketch your cave on paper, and only then paint it.

The Problem: A Cave With No Reason to End ~20 min

Right now the Platformer scene is a box with a floor. You can walk in it, and there is nothing to do. Before you can design a cave you must know exactly what you can put in one — so take inventory. Tick every row honestly; several of these will force you to place or build something first.

ToolWhere it comes fromWhat you must still do
Cave tiles (floor, wall, backdrop) 7.1 — the tileset in Assets/Artwork/Platformer/Sliced/ Paint them. The existing cave is only about 20 tiles wide.
The Player, with walk, jump, coyote time and a double jump Units 1–6, on the Player prefab Nothing. This is the one tool that is genuinely finished.
Spikes The Spikes prefab, tagged Spikes since 2.2 Place them yourself — no spikes exist in any scene, and the prefab still has no collider unless you added one in 2.2.
Coins The Coin prefab, from 2.1 Place them. Coins live in the Overworld; the cave has none.
The enemy on its patrol / chase / attack state machine Unit 4, on the MobileEnemy prefab Place instances, and check it actually moves in this scene — it needs whatever your state machine needs to find the player.
The turret and its projectile Unit 3, on the Turret and Turret_Projectile prefabs Place instances. Only a couple exist in the project today — you are the one who decides how many the cave gets.
The ladder 7.3 and 7.4 — built entirely by you Rebuild it wherever the cave needs one. Nothing about it ships. It is a zone you place and a strip of tiles you paint.
The lever and its door The Switch prefab plus Lever.cs, from 5.2 Wire the UnityEvent, and build the thing it opens. Lever.cs is real, working, tested code — it is the one piece of this project you can trust completely.
An exit The Cave Exit object, already sitting in the Platformer scene with a SceneSwitch pointing at the Overworld Decide whether the cave ends there, or somewhere you build yourself.

Notice what is not on that list. There is no boss and no boss door in this project — no sprite, no prefab, no object in any scene. If you want the cave to end at something dramatic, you build that thing, and the cheapest dramatic thing you already own is a lever that opens a door. Today you decide what the cave's ending is, and then you design everything as a path toward it.

Architectural specification: choose your ending before you sketch. Read all three, pick one, and write down why:
  • A lever-operated door. The Switch prefab sits in the cave; pressing E nearby calls Interact(), which fires a UnityEvent you wire in the Inspector. Point that event at a door object and have it do something visible — disable the collider so the player can pass, or move a wall aside. The lever never names the door; the event is the wire between them. This is a real puzzle with real code you already have.
  • A collectible target. Somewhere in the cave, put something the player is obviously trying to reach — a coin cluster, or the Axe Item prefab. The cave ends when they reach it, even if nothing explodes. Cheap, and completely unambiguous.
  • The existing exit. The Cave Exit object returns the player to the Overworld hub. Reaching it ends the cave. The cost of this option is that it is already in the scene, so it is not a discovery — you may want to place a second one somewhere the player has to earn.

1. Flow: the path is the message. Players move toward open space, light and reward, and away from spikes and enemies. A level steers without a single word.

Good: room → glimpse of the next room through a gap → curiosity pulls
Bad:  room → identical exits left and right, both dark → the player stops,
      and a stopped player reads the room as a wall

2. Pacing: the beat chart. A good cave is a rhythm of tension and release. Yours should have four to six beats, and it should end at the ending you just chose:

SectionBeatWhat the player feels
1 Entrancequiet"I belong here"
2 First hazardtensionthe first jump that can kill you
3 The climbrelease, then tensionyour ladder, with something watching from above
4 Rest and rewardreleasebreathing room, and coins on the route you wanted walked
5 The gauntletpeak tensioneverything at once, for a short stretch
6 The goalquietthe lever, the door, the thing you built — and the cave lets you finish

3. Difficulty curve, at the scale of rooms. Each section may introduce one new combination. Spikes plus a turret is one new thing. Spikes plus a turret plus a ladder plus a moving platform is four, and it is not a level, it is a wall.

4. Signposting: telegraph everything. Safe routes look safe. Danger is visible before it is threatening — the turret is seen at rest before it fires, exactly as you tuned it in 3.4. The goal should be visible from the entrance, or glimpsed once on the way.

Socratic: Hard but Fair, or Easy but Random?

  1. Difficulty and fairness are different axes. Describe a cave that is hard and fair, and a cave that is easy and random. Which one do testers call "good" even when they die repeatedly?
  2. Your spikes do not ship in the cave — you place every one of them. What does that make you responsible for that a designer who inherits a level is not?
  3. A lever door asks the player to find a switch and then find the door again. Which of those two is the puzzle, and how does the layout answer it without a single line of text?
Read Function-Level Examples ~10 min

A beat chart is data. Read each of these for what it does in isolation, then work out what it has to do with the page you are about to sketch.

Example 1 — A museum's audio-guide running order:

// Each stop declares how long the visitor is expected to linger.
stops = [{ "entrance", 45 }, { "armoury", 90 }, { "exit", 20 }];

Example 2 — A theme park's queue design notes:

// The ride must be visible from the queue, or the wait feels
// longer than it is. Sightline is a queue-management tool.

Example 3 — A supermarket's one-way aisle plan:

// The route is decided by the building, not by signage.
// If a shopper doubles back, the plan failed, not the shopper.

Example 4 — An airport's wayfinding audit (comment only):

// A traveller who stops walking is a sign that the next step was
// not visible from the last one. Count the stops, not the signs.

Example 5 — A film editor's reel timings (comment only):

// Tension and release alternate, and the release is timed, not
// left to chance. Nobody edits a film as one long crescendo.
Architectural specification: your cave, in writing, before any paper. Answer these in a notes file. They are the design document, and the sketch is just a drawing of the answers.
  • What is the ending, exactly — a lever door, a collectible, or an exit? Name the object you will place and the one thing the player must do to reach it.
  • How many beats does your cave have, and what is each beat's one-line feel sentence? If you cannot write the sentence, the beat is not a beat.
  • Which beat introduces each new combination, and what is the single new thing in it?
  • Where is the ladder, and what does the player see from the bottom of it? Remember the ladder is a zone plus a painted strip — what is its height in tiles?
  • Where are the spikes? They are yours to place, so name the exact count and where each one is. "Some spikes" is not a design.
  • What does the player see from the entrance, and what do they see from the rest beat?
  • If the player dies at the gauntlet, how many seconds of progress do they lose?
Design Lab: The Paper Cave ~25 min

Step 1 — the sketch. Pencil, one page, the whole cave: every beat as a box or a room, arrows for the path, notes for threats, and a marked symbol for the goal. No detail inside any single screen — flow first. This paper is the design; the tilemap is only a transcription of it.

Step 2 — the camera pass. Your camera shows a fixed width, so mark on the sketch what is visible from each beat. Standing in beat 2, the player should see beat 2's challenge and a promise of beat 3 — a glimpse of a ledge, a coin just out of reach, a light. Adjust the boxes until every screen shows one challenge and one hint.

Step 3 — the death audit. Walk your sketch and ask at every beat: if the player dies here, what do they lose? Under twenty seconds of progress is healthy. Over a minute is spite, and the repair is either a shorter approach or a checkpoint you build yourself — a trigger that stores a position and a respawn that reads it. Decide honestly whether your cave earns checkpoints or not.

Step 4 — the inventory pass. For every object your sketch demands, write where it comes from: a painted tile, a prefab you place, or a thing you must build yourself. Anything in the third column is a job you are taking on in 7.6 — count them before you commit.

Checkpoint — before moving on, you must be able to:

Reference Docs

Need a deeper explanation? These pages cover the same concepts:

Next: 7.6 — Level Studio I, where the paper becomes tiles.

0/3 answered

Answers save on this device as you type. At the end of class, click Download and upload the file to the Canvas assignment.

Saved on this device only — the Dashboard tracks your progress.