Students give the player lives, make a hit cost one life, and see that the engine ends the game at 0 lives and that an overlap runs every frame while sprites touch.
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 7 min · Mix it up 3 min · Make 9 min · Dodgeball 4 min
Info blocks keep a score and lives (hearts) at the top of the screen. When the lives reach 0, Arcade ends the game by itself. One important fact: an overlap event runs every frame (about 30 times a second) while the two sprites still touch. If the enemy is not destroyed, one touch takes life after life, and the game ends at once. Timers (a new enemy every second) are next lesson; here the rocks are made at the start and flown in with a velocity.
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.
A student who is tagged loses a 'life' card for every second the tagger keeps touching them.
Ten seconds of touching takes ten cards. The tagger must let go: that is destroy.
Swap dodge games with the next pair. Does one hit cost exactly one heart?
An overlap runs every frame while sprites touch, so one hit takes every life. Ask what happens to the enemy after it touches the player.
| What you will see | A question to ask | The fix |
|---|---|---|
| One touch ends the game. | What happens to the enemy after it touches the player? | Nothing, so the overlap runs again next frame. Add destroy otherSprite inside the overlap event. |
| No hearts at the top of the screen. | Is there a set life block in on start? | Add set life to 3 (Info). Lives appear only once they are set. |
| Touching a rock does nothing. | What kind are the rocks, and what kinds does the overlap name? | The rocks are Enemy; the event must be Player with Enemy. |
One possible solution for each task. Other correct programs are fine.

info.setLife(5)
let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
mySprite.setPosition(20, 60)
controller.moveSprite(mySprite)
mySprite.setStayInScreen(true)
let heart = sprites.create(img`
2 2 . 2 2
2 2 2 2 2
. 2 2 2 .
. . 2 . .
`, SpriteKind.Food)
heart.setPosition(80, 100)
let rock = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock.setPosition(160, 30)
rock.vx = -40
let rock2 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock2.setPosition(240, 60)
rock2.vx = -40
let rock3 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock3.setPosition(320, 90)
rock3.vx = -40
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.destroy()
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
info.changeLifeBy(1)
otherSprite.destroy()
})

info.setLife(5)
let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
mySprite.setPosition(20, 60)
controller.moveSprite(mySprite)
mySprite.setStayInScreen(true)
let heart = sprites.create(img`
2 2 . 2 2
2 2 2 2 2
. 2 2 2 .
. . 2 . .
`, SpriteKind.Food)
heart.setPosition(80, 100)
let rock = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock.setPosition(160, 30)
rock.vx = -40
let rock2 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock2.setPosition(240, 60)
rock2.vx = -40
let rock3 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock3.setPosition(320, 90)
rock3.vx = -40
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.destroy()
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
info.changeLifeBy(1)
info.changeScoreBy(1)
otherSprite.destroy()
})

info.setLife(3)
let mySprite = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
mySprite.setPosition(20, 60)
controller.moveSprite(mySprite)
mySprite.setStayInScreen(true)
let rock = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock.setPosition(160, 30)
rock.vx = -40
let rock2 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock2.setPosition(240, 60)
rock2.vx = -40
let rock3 = sprites.create(img`
. e e .
e e e e
e e e e
`, SpriteKind.Enemy)
rock3.setPosition(320, 90)
rock3.vx = -40
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.destroy()
})
Open task: any program that does what the step asks.
Stretch: Add a coin worth points, so there is something to chase as well as dodge.
Support: Give students the overlap event already placed, and ask them to fill in the two blocks inside.
In a dodge game one touch takes all three lives. What one block is missing, and why does it matter?
destroy otherSprite in the Player–Enemy overlap. The overlap runs every frame while the sprites touch, so without it the same enemy takes a life each frame.
Next lesson: a timer that sends a new rock every second, for as long as the game lasts.