Level 6

Many Sparks

Level 6 · Chapter 5

What this lesson follows

CSTA K–12 Computer Science Standards (2017)

Algorithms & Programming · Grades 6–8

Combine loops and conditions, even nested ones.

Code 2-AP-12Read the official text

Also practised: 2-AP-11

Common Core State Standards for Mathematics

Ratios & Proportional Relationships · Grade 6

Compare two amounts with a ratio.

Code 6.RP.A.2Read 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 use clones to make many sparks. Each clone has its own speed and fades away.

1👋 Warm-Up

For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 2
✦ CSTA 2-AP-12 · CSTA 2-AP-11 · ISTE 1.5.c · Standards
🎯 I canuse clones to make many sparks. Each clone has its own speed and fades away
📝 New words6 words
⏱ Lesson time~45 min
Teacher Guide

📋 Before class

⚠️ Common misconceptions

  • Students think every clone shares one speedx/speedy. A variable made "For this sprite only" is copied into each clone, so each clone keeps its own speed. A "For all sprites" variable is shared: every clone reads the same one each frame, so all sparks move the same way.
  • Students often make all 20 clones in one fast loop with no wait between them. Without a small wait (0.05 secs), the whole burst appears in the same instant instead of one spark after another.

🎯 Differentiation

🐢 Struggling: Start with one clone. Make it move up and fade out. Get that working first. Then loop the maker to 5 clones.

🚀 Advanced: Add a wind variable that changes over time. Add wind to speedx so sparks drift sideways. Try reusing old clones from a list instead of deleting and remaking them.

💡 During the lesson

  • Warm-UpShow a short clip or screenshot of a firework effect from a well-known game (e.g., Mario fireworks, Minecraft sparks). Ask: "How many separate dots are on screen at once?" Answers usually range from 10 to several thousand. This motivates why managing many clones matters. Frame it simply: one clone = one spark; many clones = the whole burst.
  • Try ItThe key insight: speedx and speedy are made For this sprite only, so each clone has its own copy, and each clone sets them at the START of its own script. If they were For all sprites, every clone would read the same one speedx each frame and all sparks would move the same way.
    The third experiment shows how one extra block creates the classic spark-fade look. The second experiment shows that with a drop of 0, speedy never changes, so the spark flies in a straight line — the drop is what makes the curve. Let students discover this before explaining.
  • PlanAsk students: "What happens if we forget the wait between clones?" (All 20 sparks burst out in the same instant instead of one after another.) Do the first box together: pick, then watch both pictures.
  • BuildScratch allows about 300 clones at once. Here each clone deletes itself after 40 frames, so only about 40–70 are alive at a time. Ask: "What if life were 400?" (Clones pile up, reach the limit, and new sparks stop.) This teaches resource management — a real limit in game making.