Today you will test your game, fix the last bugs, and show it to the class.
1 Warm-Up
2 Predict
3 Try It
4 Plan
5 Build
6 Fix It
7 Extend
8 Math Challenge
For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 2
✦ CSTA 2-AP-17 · CSTA 2-AP-13 · CSTA 2-AP-12 · ISTE 1.4.d · ISTE 1.5.c · ISTE 1.6.b · Standards
| 🎯 I can | test your game, fix the last bugs, and show it to the class |
| 📝 New words | 6 words |
| ⏱ Lesson time | ~50 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students spend the full session fixing bugs and skip showing their game. Showing the game to a friend is part of the lesson — save time for it.
- Students test by playing the normal way. Tricky cases show up only when you do odd things — hold many keys, click fast, let the timer run out at an odd moment.
- Students think one good round means the game is done. One good round does not catch a score that did not reset or a sprite that froze after restart.
🎯 Differentiation
🐢 Struggling: Give the student a short check list: (1) score resets, (2) nothing freezes, (3) start screen shows, (4) one sound plays. These four are enough to show the game. Do not chase tiny bugs — show the game with these four passing.
🚀 Advanced: Ask the student to add a second way to play — a 'hard mode' button on the start screen that makes enemies faster and spawns them sooner. Ask: which variable or broadcast do you need to change?
💡 During the lesson
- Warm-UpReserve the first 20 minutes for testing and fixing. Walk the room and look for the four most common last-day problems: (1) score does not reset, (2) something freezes, (3) the spawner keeps running after game over, (4) the start screen is missing. A missing start screen can be added in under 5 minutes. Do not let a student show their game without passing at least items 1, 2, and 6 (all parts reachable, nothing frozen, start screen present). Keep each show-and-tell to 3 minutes — stopping on time is part of the practice. Watch for a tricky case ⚠️ — an odd thing a player does that can break the game — and write down each friend's idea 👥 you hear after they play.
- Try ItThe game_over_triggered flag stops "show_gameover" from firing three times when three hits happen in one frame. Students who see game over flash and restart right away usually have this bug. The flag must be reset inside reset_game — or the game cannot end a second time.
Each experiment is one item of the check list. In the first, a small step never reaches the edge, so the keep-in-range block has nothing to do; bigger steps stop at exactly 220. In the second, the same spawner makes 5 enemies while playing and none at game over. In the third, any number of hits gives one game over — then ask what happens in round two if reset_game never sets game_over_triggered back to 0. - BuildThe
waitblock stays outside theifso the spawner checks everyspawn_delayseconds instead of running at full speed. Students who move thewaitinside theifmake a new bug: when game_state is not "playing", the forever loop spins as fast as it can, checking over and over, and wastes the computer's time. Ask: "Where should the wait go — inside or outside the if? Why?"
Suggested time split: 20 min testing and fixing → 15 min playing friends' games and giving ideas → 10 min final polish → 5 min per show-and-tell slot (3-min play + 1-min talk + 1-min change-over). Do not let students spend 45 minutes fixing bugs and skip showing their game — showing it is graded. At the 20-minute mark, announce that testing ends and getting ready to show begins.
Show the picture first. Ask what will happen — everyone points or says one word.
Everyone picks an answer first. Then press the flag together.
Change one thing at a time. Run it, watch, then change the next thing.
Pairs put the cards in order before anyone opens Scratch.
Students build step by step. Walk around — help with questions, not with the mouse.
Ask: what did we want, and what did it do? Let them find it.
Fast finishers pick the next tier. Everyone else finishes their build.
Work it out on paper first. Then check it on the stage.