8.1 — Boss Design: Spec It First
Open the Project window, click into the search box and type boss. You will find
nothing — no sprite, no prefab, no arena, no locked door. Every other unit
this year handed you a starter asset and asked you to make it behave. This one hands you an
empty search result. So today you build nothing: you read what the project actually has, then
write the document that decides what the next four lessons are.
The inventory is the first half of a spec. You cannot design a fight against a project you have not read, and the fastest way to write a bad boss is to assume an asset exists that does not.
-
Project window → set the search box to All and type
boss. Nothing. Then openAssets/Artwork/Character/Enemyand read what is genuinely there:OrcwithAxe1.png,OrcwithAxe2.png,LoRTowerV2_blue_no_soul_no_fire-Sheet.pngandTurret_Bullet.png. The neighbouring Player folder holdsAxe1,Axe2andShovel. That is the entire palette a boss can be assembled from. -
Project window →
Assets/Prefabs. Eight prefabs are waiting there, and not one of them is a boss. The enemy, the turret and the tower sheet you just looked at are the three pieces 8.2 builds one out of. -
Project window →
Assets/_Scenes, then open each scene in turn and Hierarchy → read what it already contains, object by object. One of the three will host the fight, and the table below is the evidence for your choice. -
Project window →
Assets/Prefabs/Switch, then Inspector → theLevercomponent on it. The UnityEvent slots are empty: that is working door machinery with no door wired to it yet, and it is what 8.5 will point at something. - Hierarchy → select one of the enemies in the Overworld and read its Inspector from top to bottom. Then ask what a boss needs that this object does not have. That gap, plus the health script you write in 8.2, is the distance between an enemy and a boss.
| What already exists | What you must create from nothing |
|---|---|
Scenes: Start (index 0 — where the game begins; it
holds the StatManager object, a Player and the tilemaps), Overworld
(the hub, with the Canvas and your enemies), Platformer (your cave).
All three contain a Player.
|
The arena — a room that does not exist in any of them. You build it with the tilemap skills from 7.1. |
| Enemy art: an orc, an orc again, a tower sheet and a bullet. A scaled orc is a real answer for a boss; so is an oversized turret. A grey rectangle is also honest. | The boss itself — no boss sprite exists, so it is assembled from that art in 8.2 rather than found. |
Systems you own: the StatManager singleton holding
your player's health and coins (the refactor you did in
5.3), an ItemSpawner, a turret that fires
projectiles, an enemy state machine, and a lever with a UnityEvent.
|
The lock, the win and the loss. There is no boss door. The
Switch.prefab carries the working Lever.cs whose events
are currently empty — you may reuse that machinery, but the door itself is yours
to make in 8.5.
|
Socratic: What Makes a Boss a Boss?
- Name the last boss you actually lost to, then beat. What did it teach you before it attacked — and how did it teach you?
- A boss is a conversation: it asks a question with an attack, the player answers with a move, and the boss responds. What happens to that conversation if an attack has no answer the player can perform?
- You searched the Project for "boss" and found nothing. Where else in this project did an object you needed fail to exist — and what did you have to decide before you could build it?
No .cs file today, and that is the point of the half. A spec fixes an
outcome and a budget and leaves the machinery to whoever builds it — and
the machinery here is four lessons of C#. Every number you write down becomes a field and
every rule becomes a branch, so they get decided here rather than inside the file.
Example 1 — A siege engine's spec sheet (the numbers are the design):
// A trebuchet is specified as: 90 m range, 8-second reload,
// 300 kg counterweight. The crew drills to those numbers.
// Nobody specifies the wood.
Example 2 — A bottling line's throughput (one number constrains every station):
// The line is specified as 40,000 bottles per hour.
// Every station's cycle time must fit inside that.
// One station out of budget makes the whole line's number a lie.
Example 3 — A recipe card is a spec (outcome and budget, not method):
// "Serves 4. 20 minutes." That is the whole contract.
// The pan, the flame and the order of operations are the cook's problem.
Predict Before You Write the Spec
- Which of the three examples above specifies a cycle time — a delay between repetitions? Which part of your fight is that same idea?
- The recipe card fixes the outcome and leaves the method to the cook. What is the equivalent of "the method" in your boss, and why should the person playing your game never have to think about it?
- The bottling line's single number constrains every station. Which single number in your boss fight must every attack's timing fit inside?
Here are the six parts of the document, what each one is for, and the failure each one prevents. Write all six today, on paper, before you touch Unity.
| Part | What it fixes | The failure it prevents |
|---|---|---|
| 1. Identity | One sentence naming what the thing is and how it behaves: "The Cave Warden: slow, huge, guards the exit, telegraphs everything." | A boss with no personality becomes a stat block, and a stat block is never scary. |
| 2. Health economy | Boss HP, against your swing's damage from 8.3, against the seconds between openings. Hits needed × seconds between openings = fight length. | A fight that is over in twelve seconds, or one that outlasts the player's patience. |
| 3. Phases (two or three) | What changes at each threshold — a new attack, a faster rhythm, a hazard waking up. | A fight whose second half is identical to its first, which players read as "the boss has more HP than personality." |
| 4. Attacks | Two or three per phase, each with four named properties: telegraph (what tells you it is coming), timing (how long you have to react), counterplay (the move that beats it), punishment (what a mistake costs). | The "dodge randomly or take the hit" attack — decoration that reads as unfairness. |
| 5. Tells and fairness | The rule from 7.5: a boss is a level that fights back, so it must be readable. Same signposting standard you applied to the cave. | A fight you can only win by memorising it, which is not the same thing as being hard. |
| 6. Arena | Where the fight happens, how the player enters, whether they may leave, and which hazards the boss ignores but the player must respect. | An arena that is a featureless box, or a fight the player simply walks away from. |
- Write the target fight length first, in seconds, and defend the number. A fight that is too short cannot teach its own patterns; a fight that is too long has to invent difficulty out of repetition.
- How many seconds out of every ten is your player actually allowed to attack? That is the inverse of your boss's attack pressure. Estimate it from the rhythm you are planning, then write it down — you will check it against the real build in 8.4.
- With that fraction fixed, how many hits must land for the fight to reach its target length? That number, times your swing's damage from 8.3, is the boss's HP — which is why HP is the last number you write rather than the first, even though it is the one the player stares at.
- Where does the player's own health come from in this calculation — a value you invent today, or the max health already sitting in your
StatManager? What does that tell you about how many mistakes the fight should allow?
- Which scene hosts the fight? The inventory above is the whole answer sheet, so say which one fact about a scene matters most for an arena — and what each of the other two would cost you.
- Where does the player enter, and can they leave the same way? If your arena has two open exits, what is stopping the player from simply walking out mid-fight?
- There is no boss door in this project, and you build one in 8.5. Decide now whether the fight is locked (a barrier appears), gated (the way onward opens only when the boss dies) or open (the player may always flee). Write one sentence defending your choice.
- Which hazards does the boss ignore but the player must respect? Why does a hazard that hurts both of you usually read as a bug rather than a feature?
- The room's size is a difficulty knob nobody remembers to turn. Sketch it in tiles using the numbers you already know: your player's walk speed and your jump's apex height from 6.3. How wide must the room be before your boss's fastest attack is dodgeable by running rather than by luck?
- For each attack, write the telegraph as something the player can see: a colour flash, a wind-up pose, a sound. "It just happens" is not a telegraph.
- For each attack, write the counterplay as a sentence naming the player's move and the number that makes it possible: "jump the wave; the wave is one tile tall and the jump apex is two."
- Is the counterplay available in every phase, or does a later phase remove it? Removing an answer is a legitimate escalation — removing all of them is not.
- Count your states: a boss with six states is a large build. How many did you write, and which one will you cut first if the build is not working by the end of 8.2?
- Which single attack is your boss's signature — the one a player would describe if asked what the fight was about? If you cannot name one, you have written a list rather than a boss.
Checkpoint — before moving on, you must be able to:
- Say what this project actually ships you for a boss, and why the body, the arena and the door must be built rather than found
- Write all six parts of a boss spec: identity, economy, phases, attacks, tells, arena
- Derive the boss's HP from your swing's damage and your target fight length instead of guessing it
- Say the counterplay sentence out loud for every attack you wrote
- Name the scene that will host the fight, and justify it against the inventory above
- Commit and push your
BOSS_SPEC.md
Reference Docs
Need a deeper explanation? These pages cover the same concepts:
- Unit 8: Boss Fight — the spec-to-build pipeline
- Enemy State Machines — the machine your boss extends, and the vocabulary you will spec in
- Unity + C# Quick Reference — the APIs the next four lessons will use
Next: 8.2 — Boss Body, Health & Phases, where the spec becomes an object in a scene.
Saved on this device only — the Dashboard tracks your progress.