Playable result only — the source code stays hidden.
Mission 00 5 min
Mission 0: See What You’re Building
Play Bug Smasher before coding. This quest changes the input model: instead of steering with the keyboard, the player aims and clicks.
New ideas
- mouse events and mouse coordinates
- click hit-testing
- elapsed time with
millis() - combining several conditions
The hints still teach new syntax, but familiar score/state/restart work is less prescriptive.
Build roadmap
What you’ll build, mission by mission
- 1Draw the bug
Create a target with a clear centre point.
- 2React to a click
Learn `mousePressed()`, `mouseX` and `mouseY`.
- 3Hit the bug
Decide whether a click landed inside the target.
- 4Score hits
Count successful clicks.
- 5Count misses
Use `else` for the opposite outcome.
- 6Add a timer
Build a 20-second countdown with `millis()`.
- 7End the round
Combine win and loss conditions.
- 8Restart
Reset a timed game correctly.
- 9Make it scurry
Use time to move the bug automatically.