Exercise 5 — Space & Pace
GAME 1303-001 · Unity 6.x · Week 7 — Tuesday, October 6
In class, 10:30 – 11:45 · 2 points · Submit by end of class
The skill
A level is not a place. It is a sequence of experiences arranged in space.
The tool that makes this designable is gating: something that stops progress until the player does a thing. A gate turns an open space into an ordered one, which means you can control what the player meets and in what order — and once you control order, you control pacing, teaching, and tension.
Today you build the smallest complete level: a space, a gate, a key, a checkpoint, and a deliberate rhythm of tense and calm.
By the end of the block you will have: a level someone else can finish unaided, with a beat chart that predicted how it would play.
This exercise feeds Milestone 3 — Level Map (Week 8), next week. What you build today is the first draft of what you submit then.
What you need
- Your Ex 3 / Ex 4 project
- Paper and a pen for Part 1. Actual paper.
Part 1 — The beat chart (10 min)
Before you build anything. Draw a horizontal line across a page. This is the player's journey from start to exit.
Above the line, plot tension from 0 to 10. Mark six to eight beats:
10 | ▲ ▲
8 | ╱ ╲ ╱ ╲
6 | ▲ ╱ ╲ ╱ ╲
4 | ╱ ╲ ╱ ╲ ╱ ╲
2 | ▲ ╱ ╲___╱ ╲______╱ ╲
0 |__╱ ╲__╱ ╲___
A B C D E F G
│ │ │ │ │ │ │
teach │ test REST gate key back exit
rest (locked) (hard)
Label each beat with what it teaches or tests. Then, in one sentence, write what the level is about: "This level teaches that you can dash through hazards, then asks you to do it under time pressure."
The flat line is the mistake. A level that is uniformly tense is exhausting, and one that is uniformly calm is boring. Rest beats are what make the peaks feel like peaks — they are not wasted space, they are what makes the space work.
Photograph it. This chart is part of your submission.
✅ Checkpoint 1 — a beat chart with at least six labelled beats and a one-sentence statement of what the level is about.
Part 2 — Block out the space (20 min)
1. Set up a Tilemap
GameObject → 2D Object → Tilemap → Rectangular. This creates a Grid with a Tilemap child.
Make one plain tile: drag a solid square sprite into the Tile Palette (Window → 2D → Tile Palette → Create New Palette). One tile is enough — greyboxing is about shape, not surface.
Add a Tilemap Collider 2D to the Tilemap, plus a Composite Collider 2D and a Rigidbody 2D set to Static. On the Tilemap Collider, tick Used By Composite.
That composite step merges thousands of tiny tile colliders into one shape. Without it, players catch on invisible seams between tiles — a bug that looks like bad movement code and isn't.
3D track: use ProBuilder or scaled cubes instead. Same principle.
2. Build the shape from the chart
Build only the geometry, following your beat chart left to right. No art, no decoration, no textures.
Budget: 60–90 seconds of play. A level you can walk in twenty seconds is a corridor; one that takes five minutes is next week's problem, not today's.
3. Place the exit
An empty GameObject named Exit with a trigger collider and a TriggerZone, wired to GameStateManager → Win (). You built this in Ex 3.
✅ Checkpoint 2 — a blocked-out space matching the beat chart, walkable start to exit.
Part 3 — Gate, key, checkpoint (25 min)
4. Build the gate
A solid object that blocks the path. Give it a Collider2D (not a trigger) and name it Gate.
5. Build the key
An object the player collects. Trigger collider, TriggerZone, requiredTag = Player, triggerOnce ✔.
Wire its On Enter () to two things:
Gate→ GameObject → SetActive with the checkbox unticked — this deactivates the gate.SoundPlayer→ your pickup sound.
That's the entire lock-and-key system. Two UnityEvents, no code.
6. Make the gate readable
The player must be able to tell it is a gate, and that the key opens it, without being told.
Cheapest effective version: colour them the same. A red door and a red key teaches itself in one glance. Colour-coding is the oldest trick in level design because it works before language does.
Better: place the gate where the player sees it before they find the key. A locked door you have already walked up to is a question. A locked door you meet holding the key is a formality.
7. Place the checkpoint
Add the Checkpoint helper to a trigger collider. On GameStateManager, tick respawnAtCheckpoint.
Where you put it is the graded decision. Put it just before your hardest beat and failure costs three seconds. Put it at the level start and failure costs ninety. Both are real designs — the first invites experimentation, the second makes the whole run precious.
8. Test the loop
Play. Reach the gate — blocked. Find the key. Return. Gate opens. Die after the checkpoint — respawn there, not at the start.
✅ Checkpoint 3 — gate blocks until the key is collected, and the checkpoint works.
Part 4 — Pace test (10 min)
9. Time it
Play your level start to finish and time it with a stopwatch. Then compare against your beat chart: did the tension land where you predicted?
It usually doesn't, in one of three ways:
| What you find | What it means | The fix |
|---|---|---|
| The middle drags | Your rest beat is too long | Cut travel distance, not content |
| The end is easier than the middle | Difficulty peaked early | Move the hard beat later, or add one |
| Nobody notices the gate | It's not visible before the key | Move the gate, or the sightline |
10. Cut one section
Find the weakest beat — the one that neither teaches nor tests — and delete it.
Nearly every student level has one corridor that exists because it seemed like the level should be longer. Cutting it makes the level better, and being able to identify it is the actual skill this exercise teaches.
11. Write your notes
Docs/Ex05_notes.txt:
What this level is about:
Teaches that you can dash through hazards, then asks you to do it
under time pressure.
Beats: 7 (chart attached)
Playtime: 74 seconds
Gate: red door at beat D, visible from beat B
Key: red key at beat E, behind the hardest jump
Checkpoint: start of beat E, immediately before the hard section
Why the checkpoint is there:
Beat E is the only part likely to kill you, and it's 45 seconds in.
Without a checkpoint there, one mistake costs the whole run and I
stopped wanting to try the risky route. With it, failure costs about
four seconds and I kept experimenting.
What I cut and why:
Beat C, a long empty ledge between the first test and the rest beat.
It was there to make the level feel bigger. It only made the walk
longer — the rest beat was already doing that job.
✅ Checkpoint 4 — level timed, one section cut, notes written.
Part 5 — Build and submit (5 min)
12. Build into MyGameName/PC_Builds/Ex05/, then submit
Zip as lastname_ex05.zip: the build, your beat chart photo, and Docs/Ex05_notes.txt.
Canvas → Assignments → Exercise 5.
Rubric — 2 points
| Criterion | Pt | Met when |
|---|---|---|
| Implementation | 1 | Build runs · walkable start to exit · gate blocks until the key is collected · checkpoint respawns correctly · no console errors |
| Design decision | 1 | Beat chart submitted with labelled beats · checkpoint placement justified in terms of what failure costs · one section cut, named, with a reason |
Troubleshooting
The player catches on invisible edges between tiles.
You skipped the Composite Collider 2D, or forgot Used By Composite on the Tilemap Collider.
The gate doesn't open.
The TriggerZone UnityEvent needs both an object and a function. GameObject.SetActive must be selected from the static parameter list, with the checkbox left unticked to deactivate.
The key can be collected through the gate.
Trigger colliders don't respect solid ones. Move the key, or make the gate wide enough to block the trigger overlap.
Respawn puts me at the origin.
respawnAtCheckpoint is on but no Checkpoint has been touched yet. The helper falls back to the first checkpoint's position on Awake — make sure one exists in the scene.
The Tilemap paints behind my background.
Set the Tilemap Renderer's Sorting Layer above your background sprite.
If you finish early
- Add a second key and gate, and make the order matter.
- Move the checkpoint to the start and play the level three times. Note how differently you behave when failure is expensive.
- Hand the build to the person next to you and say nothing. Watch where they hesitate — that hesitation is where your level is unclear, and next week's milestone grades exactly that.
Before next week
Week 8 is Milestone 3 — Level Map, 5 points. It is this exercise applied to your own game: an annotated map plus a walkable blockout. Read milestone-3-level-map.md and run the ④ Level Map tab of the course checklist.
Your beat chart from today is most of the annotation work already done.