🐟 Planning Workbook: Fishy
How to use this workbook: work top to bottom. It walks you through planning Fishy with the method from 01-How-to-Plan-a-Game, then gives you a build order. It says what each piece is and which technique to reach for — you open the Technique Playground and write the code. Wherever you see ✍️ YOUR TURN or a checkbox, that's your work.
The game in a nutshell
You're a small fish in the sea. Swim around and eat fish smaller than you to grow bigger. But watch out — fish bigger than you will eat you. The bigger you grow, the more of the ocean becomes your lunch.
This game's special new idea is size that changes — your fish grows, and size decides who eats whom.
Step 1 — Say it in one sentence
Starting version — ✍️ YOUR TURN: make it yours.
"Swim around eating smaller fish to grow, while dodging fish bigger than me."
Step 2 — What's on the screen? (objects)
- Player fish — you. (a circle, or a circle + a little triangle tail)
- Other fish — lots of them, in different sizes. (circles of different sizes/colors)
- Score / size text — the HUD.
- The sea — a background color.
✍️ YOUR TURN: decide your shapes and colors. A neat trick: color fish by how dangerous they are (green = smaller than you, red = bigger than you). You could add that later.
Step 3 — What does each object DO? (behaviors)
✍️ YOUR TURN: fill in the blanks.
- Player fish: moves where you steer it, and __________ when it eats.
- Other fish: __________ across the screen, then disappear when they swim off the far side.
- New fish: keep __________ over time so the sea never runs empty.
Step 4 — The rules ("when ___, then ___")
The heart of Fishy is a size comparison. Fill in the blanks.
- When the player touches a fish that is smaller → __________ it, grow a little, +score.
- When the player touches a fish that is bigger → __________________________.
- Every so often → spawn a new fish at a random size and position.
🔑 Key insight: every fish (including you) needs to know its own size as a number. The whole game is really just: "compare my size to the fish I touched — bigger number wins."
Step 5 — States (scenes)
Title → Playing → Game Over (eaten by a bigger fish) → back to Title.
✍️ YOUR TURN — DECISION: is there a win, or is it endless (go for a high score)? Two good options:
- Endless: never "win" — just survive and grow for the highest score.
- Goal size: reach a target size (e.g. the biggest in the sea) and you Win.
Pick one. (Technique 11 covers scenes.)
🧩 Your Architecture Map
Two rows filled in as examples. ✍️ YOUR TURN: complete the rest.
| Object | Shape & color | What it does | Collides with | Components it needs | Technique(s) |
|---|---|---|---|---|---|
| Player fish | blue circle | swims where you steer; grows | other fish | pos, circle, color, area, scale |
4, 5, 8, 13 |
| Other fish | circle, random size | drifts across; spawns over time | player | pos, circle, color, area, move, offscreen, tag "fish" |
5, 9 |
| Score/size | text | shows your size/score | — | pos, text |
12 |
Notice the player has a scale component — that's the growing part (Technique 13).
🏗️ Build order (your milestones)
Build one at a time. Run and check the "✅ works when" line before moving on.
Milestone 1 — Your fish swims
Put the player fish on screen and let it move. Fishy is a free-swimming game (no maze, no gravity), so this is the simplest movement of the three games.
- 🤔 DECISION — how do you steer? Pick one:
- Arrow keys / WASD: move up/down/left/right (Technique 4 + 5).
- Follow the mouse: the fish swims toward your cursor (Technique 5 shows a "move toward a point" trick, and Technique 14 uses the same idea).
- Try one; you can switch later.
- ✅ Works when: you can swim your fish around the screen.
- 🔧 Techniques: 1, 2, 4, 5
Milestone 2 — The sea fills with fish
Spawn other fish over time (Technique 9). Each new fish should:
appear at a random position on one side,
have a random size (store that size as a number!),
drift to the other side, and
get removed when it swims off-screen (Technique 9's off-screen cleanup).
✅ Works when: fish keep appearing and drifting across, and old ones vanish off the edge (they don't pile up forever).
🔧 Techniques: 9, 5, plus 3 for tagging them
"fish"
Milestone 3 — Eat the smaller fish
Give the player an onCollide with the "fish" tag (Technique 8). In the collision, compare sizes: if the other fish's size number is smaller than yours, eat it (destroy it) and add to your score (Technique 12).
- 🔑 This is where your "every fish knows its size" plan pays off. The comparison is the whole game.
- ✅ Works when: swimming into a smaller fish makes it disappear and scores; swimming into a bigger one does nothing yet (that's the next milestone).
- 🔧 Techniques: 8, 12
Milestone 4 — Grow when you eat
Each time you eat, make the player a little bigger (Technique 13 — growing with scale). Also bump the size number you compare with, so as you grow you can eat bigger and bigger fish.
- 🤔 DECISION: how much do you grow per fish? A tiny bit each time feels smooth; too much and you win instantly. Tune it by testing.
- ✅ Works when: eating fish visibly grows your fish, and you can then eat fish you couldn't before.
- 🔧 Techniques: 13
Milestone 5 — Getting eaten ends the game
Now handle the other half of the size comparison: if the fish you touch is bigger than you, it's game over (Technique 11).
- ✅ Works when: touching a bigger fish sends you to a Game Over screen, but smaller fish still get eaten.
- 🔧 Techniques: 8, 11
Milestone 6 — Title, Game Over, and score
Wrap it in scenes: a Title screen ("Press SPACE to swim"), and a Game Over screen that shows your final size/score and lets you restart. If you chose a goal size, add the Win scene too.
- ✅ Works when: the game has a start screen, plays, ends, and restarts — the full loop.
- 🔧 Techniques: 11, 12
🌟 Stretch goals (only after it works!)
- Danger colors: tint each fish green if it's smaller than you and red if it's bigger, updated as you grow. (Great use of checking sizes every frame.)
- Fish that react: small fish flee from you; big fish chase you (Technique 14 — same "move toward/away from a point" idea).
- A gulp sound when you eat (Technique 15).
- A "you're the biggest fish in the sea!" win when you reach the top size.
- Face the fish left or right depending on swim direction.
- Swap the circles for real fish sprite images (Technique 2).
✅ Fishy planning checklist
- I filled in the Architecture Map (all rows).
- I understand every fish needs a size number, and the game compares sizes.
- I decided my controls (keys vs mouse).
- I decided endless vs goal-size (win or no win).
- I know my lose condition (touched a bigger fish).
- I have my milestone list and I'm building one at a time.
Start with Milestone 1 — get your fish swimming. Then let the sea fill up. 🌊