Today you will make a sprite jump up and fall down using one number that changes every loop.
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-11 · CSTA 2-AP-12 · ISTE 1.5.c · Standards
| 🎯 I can | make a sprite jump up and fall down using one number that changes every loop |
| 📝 New words | 6 words |
| ⏱ Lesson time | ~45 min |
Teacher Guide
📋 Before class
⚠️ Common misconceptions
- Students think moving y by the fall-speed number is the same as setting y. change y by (vel_y) adds the fall-speed number to the current position each loop — the moves add up.
- Students set vel_y to 0 every loop instead of only when touching the ground. The down step must happen every loop; reset only on landing.
- Students put the jump step inside the down step. Jump and fall must be separate if-branches — only one runs per loop.
🎯 Differentiation
🐢 Struggling: Start with falling only — no jumping. Get the sprite falling and landing before adding the space-key jump.
🚀 Advanced: Make the jump height change: the longer the player holds space, the more loops vel_y goes up before it starts to fall (hold-to-jump).
💡 During the lesson
- Warm-UpAsk students: "If Pico is in the air and nothing is touching him, what should happen?" (He falls.) "If he is on the ground, what should happen?" (Nothing — the floor stops him.) This motivates the ground check before introducing the code. The
vel_ynumber is just a label for the sprite's fall speed: a plus number moves it up, a minus number moves it down, and it goes down by 1 each loop. - Try ItDraw a number line on the board. vel_y starts at 0. Each loop: take away 1. At loop 12: vel_y = -12. The sprite moves down 12 pixels that loop. When it touches the ground: set it back to 0. When it jumps: set it to +12. The up-and-down curve is just this number line played over time.
The first experiment has no ground check, so nothing stops Pico — he falls straight through the floor to the bottom of the stage. The second experiment adds one new block: the ground check. Pick 0 in the first experiment to show what the fall step does: with 0, vel_y stays at 0 forever — no movement. Each experiment changes one number in the blocks. - PlanThe flowchart order matters. The fall step must run before the ground check, or the sprite will sink into the floor on the first loop. The jump check sits inside the ground check, so Pico can jump only while he stands on the floor.
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.