◀ 6.46.57.1 ▶

6.5 — Platforming Studio: The Gauntlet

Build day. Every skill from this unit — the flick, the honest ground check, the mercies, the counter — goes into one room that a stranger must finish without a single word from you. The grade is not difficulty and it is not art. The grade is clarity: a player who has never seen your cave should know where to go next by looking at it.

In the Editor ~25 min

Everything in this room is yours to place. Read that again, because it is the thing people get wrong on build day: the cave scene ships with a floor and nothing else. If your gauntlet needs a hazard, you drag it in from Assets/Prefabs and make it work — which means giving the Spikes a collider, the way you did in 2.2, and giving anything you want to pick up a collider and a tag the way you did in 2.1 and 6.4.

  1. Scene view → extend the floor out to the size of the room your gauntlet needs, with a wall around it — painting from the Tile Palette window (Window ▸ 2D ▸ Tile Palette) if you are extending the cave's Collision tilemap, or dropping sprites in and adding their Box Collider 2D from the Inspector if you are not. Floor first — nothing else in this lesson can be measured until there is something to stand on and something that stops you.
  2. Hierarchy → select the Player instance, then Inspector → Transform → Position to type an exact start position instead of eyeballing one. Then Hierarchy → right-click → Create Empty, name it something you will recognize, and check that the two positions agree — a remembered coordinate is not a start pad.
  3. Scene view → build the gap: two surfaces on the Collision tilemap with a hole between them. Measure it against the jump numbers you tuned in 6.1, not against what looks right.
  4. Scene view → build the climb the same way, painting ledges on top of the floor you already have. Section 2's row in the table below is the measurement rule — a ledge one pixel too high is a ledge a tester will find.
  5. Project window → Assets/Prefabs, drag the Spikes prefab into the Scene view across the spike run, then Inspector → Add Component → Box Collider 2D on each one, plus small platforms in the Scene view to cross them. Settle Is Trigger before you press Play, and be ready to say what a spike a tester can walk through is for.
  6. Scene view → place the Coins — a few a tester collects on the way, and one on a ledge that is visible from the ground, out of reach of one jump and reachable with two. Inspector → Tag → Coin on every one of them.
  7. Hierarchy → add the object that ends the run, and Scene view → put it past the last threat. Leave its collider and its tag alone until you have read the finish-line specification below — it asks which of the two objects in an overlap needs the trigger, and that decision is yours.
  8. Inspector → Main Camera → the follow script from Assets/Scripts/Package Scripts has two fields: an offset, and a checkbox that decides whether the camera follows the player vertically. Section 2 is a climb — change the checkbox if the climb leaves the screen, or write one sentence saying why you left it where it is. A room you cannot see is not a room you designed.
  9. Game view → press Play with a single section built and nothing else, and finish that section. Then build the next one. GitHub Desktop → commit after each one you get through.
SectionWhat it testsWhat you must place yourself
1 — The gap A jump across a hole with a running start. Two platforms with a gap between them. Extend the floor by painting on the Collision tilemap, or drop in sprites with colliders — either is fine.
2 — The climb A jump up onto a ledge, then another. Raised surfaces. Measure the height against what your 6.1 numbers can actually reach — not against what looks right.
3 — The spike run Precision under threat. Spikes from Assets/Prefabs/Spikes, each with a solid collider you add, plus small platforms to cross them.
4 — The soft gate A promise: something visible you cannot have yet. A Coin from Assets/Prefabs, placed out of reach of one jump and reachable with two.
5 — The gauntlet's end A threat you pass rather than fight, and a clear finish. A ranged threat and a finish trigger. Use the turret from 3.1 if yours is working; an enemy or a second spike run is a legitimate substitute.

Rules of the studio:

In the Code ~20 min

Two specifications get finished in the file rather than the Inspector: the trigger that ends the run, and the rule that decides what a death costs. Then the five examples below — none of them is code to copy, and none of them is about video games.

Architectural specification: the finish line.
  • The finish is a trigger, so which object needs the collider with Is Trigger ticked — the flag, or the player? What does 2.1 say about the minimum for an overlap to be reported at all?
  • Which callback fires, and what parameter type does it hand you? Which tag check tells you the thing that arrived was the player and not a stray projectile?
  • What does it print? Your HUD lives in Start (index 0) and reads your stats — it is not in this scene, and it does not know a finish line exists. So the Console is still how a tester learns they finished.
  • Does the finish fire once, or every frame the player stands in it? How do you make it fire exactly once?
  • Should the finish do anything else — stop the player, print a time, count attempts? Decide, and be able to say why you stopped where you did.
Architectural specification: dying has to mean something.
  • What does your death rule from 2.2 actually do — reload a scene, or reset and move the player? Read your own code and state it in one sentence.
  • If you reload, the player reappears at wherever the Player instance sits in the saved scene. Is that the start of your gauntlet? If you dragged the Player to the start during Play mode, was that position saved when you stopped?
  • Where is your start pad — an actual object the player stands on, or just a remembered position? What happens to a tester's first thirty seconds if the room starts them mid-section?
  • If your death rule loads a scene by name or index, read Build Settings before you answer: which scene is index 0, and does it contain a Player? Find out rather than assuming.
  • What survives a death in your build — the coin count, the boots, the health — and what is lost? State it, then test it, then decide whether you accept the rule.

Level design has a literature, and none of it is about video games. Read these for the principle, then name the section of your gauntlet each one is complaining about.

Example 1 — A theme park queue (comment only):

// The rope maze does not stop anyone. It just makes the wrong path
// obviously longer than the right one.

Example 2 — A furniture showroom (comment only):

// Every room is visible from the doorway. Nobody is ever told where to go.
// They are simply able to see it.

Example 3 — A bowling lane (comment only):

// The gutter is visible from the foul line, not discovered at the pins.
// A hazard you only meet at full speed is a hazard you cannot learn.

Example 4 — A building's fire escape (comment only):

// Two ways down from every landing, because on the day it matters
// one of them will be blocked.

Example 5 — An attempt counter at a climbing wall:

if (testerFell) attempts++; // the number that turns "hard" into "learning"

Socratic: Reading a Room

  1. The rope maze makes the wrong way slower without blocking it. Which section of your gauntlet does that, and which one just blocks?
  2. The showroom assumes the visitor can see the whole space. Can a tester see your section 4 gate from the moment they could possibly need it — or only after they have already walked past?
  3. The bowling alley puts the gutter where you can see it from the start. Where is your spike run visible from, and what speed is a tester moving when they first see it?
Playtest: Silent, With Numbers ~20 min

The silent-watching rules from 2.4 still apply — no hints, no pointing, no explaining. Today you also record numbers per section. Vague feedback is what you get when you did not write anything down.

SectionDeathsTime (seconds)What the tester said
1 — the gap
2 — the climb
3 — the spike run
4 — the soft gate
5 — the end

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

Reference Docs

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

Next: 7.1 — Tilemaps: The Level Editor — Unit 7 begins, and the rooms you build get much bigger.

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.