🧠Concept
Pick the right answer.
vel_y number tell you?vel_y. What happens to the sprite over many loops if nothing stops this loop?vel_y is a big minus number. What bug can this cause?forever
change [vel_y v] by (-1)
change y by (vel_y)
if <touching color [#8B4513]?> then
set [vel_y v] to (0)
set y to (-120)
end
end👀Code Reading
Look at the blocks. Predict what happens.
vel_y after this sequence runs once (assume vel_y starts at 0)?set [vel_y v] to (0) change [vel_y v] by (-1) change y by (vel_y)
when flag clicked
forever
if <key [space v] pressed?> then
set [vel_y v] to (12)
end
change [vel_y v] by (-1)
change y by (vel_y)
endif <touching color [#8B4513]?> then set [vel_y v] to (0) set y to (-120) end
🐛Find the Bug
Something is broken. Pick the fix.
This script should cap the fall speed so the sprite does not skip past thin platforms, but the sprite still falls through them. What is the fix?
when flag clicked
set [vel_y v] to (0)
forever
change [vel_y v] by (-1)
change y by (vel_y)
if <touching color [#8B4513]?> then
set [vel_y v] to (0)
set y to (-120)
end
end🛠️Build It
Pick a level. Build it. Check the boxes.
Make Pico fall to the ground.
More
Build a falling sprite. Use a vel_y variable and a forever loop that takes 1 away from vel_y each loop and then changes the y position. The sprite should fall to the bottom of the stage and stop.
Done when
vel_y is used as the fall speed. The code takes 1 away from vel_y each loop. The sprite stops when it reaches the ground (edge or color). vel_y is set to 0 on landing.
Fall, land, and jump with space.
More
Add jumping. The sprite should jump when Space is pressed but only when it is on the ground (touching the ground color, or at the floor y). Use the move-to-floor step from the lesson (set [vel_y ▾] to (0) + set y to (-120)) to set the sprite on the floor when it lands.
Done when
Jump only happens when touching ground AND Space is pressed. vel_y is set to a plus number on jump. On landing, vel_y is set to 0 and set y puts the sprite on a fixed floor y so it rests on the platform.
Fall with a speed limit and jump.
More
Put everything into one stage. Add the fall-speed cap so vel_y never goes below -15, keep a working ground-only jump, add left and right arrow keys, and add coyote time: a short grace window to jump after walking off the edge.
Done when
vel_y is capped at -15 top fall speed. The sprite lands on the platform and never falls through it. It can jump only on the ground or during the grace window.
Review the student's project, then check each thing they did.
Project Evaluation
0 of 4 ticked
💬Talk About It
Present your project to your teacher or a classmate.
- 1️⃣Show your jumping sprite.
- 2️⃣Point to the
vel_yvariable. - 3️⃣Make it jump, say what makes
vel_ygo down, and say why the fall speed has a cap.
Watch the student present, then check each thing they did.
Presentation Checklist
0 of 4 ticked
📤Submit
Send your results to your teacher and parent.
0 of 0 answered