Level 6

Build the Core

Level 6 · Chapter 8

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-14

Common Core State Standards for Mathematics

The Number System · Grade 6

Use negative numbers on the number line.

Code 6.NS.C.8Read 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 build the core part of the game first — make one round work.

1👋 Warm-Up

For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 2
✦ CSTA 2-AP-17 · CSTA 2-AP-13 · CSTA 2-AP-14 · ISTE 1.5.c · ISTE 1.4.d · Standards
🎯 I canbuild the core part of the game first — make one round work
📝 New words7 words
⏱ Lesson time~50 min
Teacher Guide

📋 Before class

⚠️ Common misconceptions

  • Students start with the player sprite because it is the most fun part. The game state must come first — without it, player controls have nothing to plug into.
  • When the enemy touches the player with no wait time, all lives drop in one moment. Show the wait-time idea before students add the touch check.
  • Students add many enemy sprites instead of one sprite that makes clones. With clones you change one sprite, not ten.
  • Students build two blocks, move left and move right, because each one moves a different way. One block with a number input does both jobs — the number carries the direction.

🎯 Differentiation

🐢 Struggling: Give the student the game-state scripts (flag clicked, forever, two if blocks) already written. Have them fill in just the initialize and game-over parts. One working round is enough — do not add more.

🚀 Advanced: Challenge the student to use a list to track where each enemy is, and a custom block that reads the list to pick where to make a clone. Ask: how does a list change the way clones appear?

💡 During the lesson

  • Warm-UpAsk students: "Why is it risky to start with the title screen or sound?" The answer: looks make a game feel done before it really works. The core test is simple — click the ▶, do something, win or lose, see a result. That test must pass today before any other work.
  • Try ItThese scripts come from Ch4 (enemy touching the player), Ch5 (clones), and earlier L6 chapters (game-state variable, custom blocks). Today the goal is to put them together in the right order — game state first, then each part plugs into it.
  • PlanDo the first box together: pick, then watch both pictures. Ask after the break: "What would tell the player the round is over?"
  • BuildThe most important check is: "Can a student click the ▶, do something, lose, and see a result?" Walk the room at the 30-minute mark and ask each student to show one round. Common blockers: (1) the game-state script is on a different sprite than the player, so they never work together, (2) the touch check runs every frame and drops all lives at once — needs the delete-clone fix from Step 7, (3) clones never start because the start_spawning broadcast is not called in initialize game. On Step 4, watch for students who build two blocks (move left and move right) instead of one move player (step) — ask them what changes between the two blocks. The only difference is a number, and a number belongs in an input, not in a second copy of the code. This is the same idea as the named job from L4 Ch6, one rung up: the name says what the job is, the input says how much.