Students give sprites a velocity, and see that the engine keeps a sprite moving every frame until something changes it, while setting a position moves it once.
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Predict and Run 7 min · Investigate 10 min · Modify 8 min · Mix it up 3 min · Make 8 min · Conveyor belt 4 min
A position (x, y) is where a sprite is now. Setting it moves the sprite once. A velocity (vx across, vy down) is a speed in pixels per second: the game engine moves the sprite a little every frame (about 30 a second), and keeps doing it until something changes the velocity. So set velocity to 50, 0 does not mean "move 50 pixels"; it means "keep moving right at 50 pixels a second", off the edge if nothing stops it.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
One student walks across the room at 'one step a second' and keeps going until someone calls a new speed.
Nobody pushes them each step. That is what the engine does with a velocity.
Position versus velocity: one sets where a sprite is, the other how it keeps moving. Ask which one the engine changes every frame.
| What you will see | A question to ask | The fix |
|---|---|---|
| The sprite flies off the screen and is gone. | What stops it at the edge? | Add set bounce on wall (for a drifting sprite) or set stay in screen (for the player). |
| A press of A sends the sprite sliding away for ever. | Did you change its position or its velocity? | For a hop, change x (position). Changing vx changes its speed, which lasts until something sets it again. |
| The cloud does not move at all. | Which sprite does the set velocity block name? | Choose the cloud in the block's dropdown; it may still name the plane. |
One possible solution for each task. Other correct programs are fine.

scene.setBackgroundColor(9)
let cloud = sprites.create(img`
. . . 1 1 . . . . .
. 1 1 1 1 1 . . . .
1 1 1 1 1 1 1 1 1 .
1 1 1 1 1 1 1 1 1 1
. 1 1 1 1 1 1 1 1 .
`, SpriteKind.Player)
cloud.setPosition(80, 30)
cloud.setVelocity(30, 20)
cloud.setBounceOnWall(true)

scene.setBackgroundColor(9)
let cloud = sprites.create(img`
. . . 1 1 . . . . .
. 1 1 1 1 1 . . . .
1 1 1 1 1 1 1 1 1 .
1 1 1 1 1 1 1 1 1 1
. 1 1 1 1 1 1 1 1 .
`, SpriteKind.Player)
cloud.setPosition(80, 30)
cloud.setVelocity(30, 20)
cloud.setBounceOnWall(true)
controller.B.onEvent(ControllerButtonEvent.Pressed, function () {
cloud.setVelocity(0, 0)
})

scene.setBackgroundColor(9)
let plane = sprites.create(img`
. . . . 2 . . .
2 . . . 2 2 . .
2 2 1 1 1 1 1 2
2 . . . 2 2 . .
. . . . 2 . . .
`, SpriteKind.Player)
plane.setPosition(20, 60)
controller.moveSprite(plane)
plane.setStayInScreen(true)
let cloud = sprites.create(img`
. . . 1 1 . . . . .
. 1 1 1 1 1 . . . .
1 1 1 1 1 1 1 1 1 .
1 1 1 1 1 1 1 1 1 1
. 1 1 1 1 1 1 1 1 .
`, SpriteKind.Player)
cloud.setPosition(80, 20)
cloud.setVelocity(-25, 10)
cloud.setBounceOnWall(true)
Open task: any program that does what the step asks.
Stretch: Give the cloud a velocity that changes on A (faster) and B (stop), and add a second cloud drifting the other way.
Support: Give students the cloud sprite already made, and ask them to add only set velocity and set bounce on wall.
A sprite has vx set to 20. Will it move 20 pixels, or keep moving? Why?
It keeps moving. vx is a speed (20 pixels every second), and the engine moves the sprite every frame until something changes vx.
Next lesson sprites notice each other: an overlap event runs when the plane touches a cloud or a coin. Class idea: measure a sprite's speed with a stopwatch.