Level 6

Launch Day

Level 6 · Chapter 10

What this lesson follows

CSTA K–12 Computer Science Standards (2017)

Algorithms & Programming · Grades 6–8

Test a program with many cases and improve it.

Code 2-AP-17Read the official text

Also practised: 2-AP-13 · 2-AP-12

Common Core State Standards for Mathematics

Ratios & Proportional Relationships · Grade 6

Compare two amounts with a ratio.

Code 6.RP.A.3Read the official text

The short lines are our own words. We matched this lesson to these standards ourselves; the standards' owners have not reviewed or endorsed this course.

Common Core State Standards © 2010 National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

Today you will test your game, fix the last bugs, and show it to the class.

1👋 Warm-Up

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 cantest your game, fix the last bugs, and show it to the class
📝 New words6 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 wait block stays outside the if so the spawner checks every spawn_delay seconds instead of running at full speed. Students who move the wait inside the if make 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.