Students keep per-level settings in lists, look them up with the level as the place (counted from 0), start each level with a startLevel function, and build a three-level dodger with a win.
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 8 min · Investigate 12 min · Modify 10 min · Mix it up 3 min · Make 13 min · Fishing 4 min
A list such as speeds (40, 70, 100) holds what changes per level; speeds[level] (get value at) looks up the value at that place, counted from 0, so level 0 uses 40. That is why the level now starts at 0 (last lesson it started at 1), and the splash shows level + 1 with join, labelled copy-for-now.
A function startLevel sets up a level: destroy all sprites of kind Enemy clears the old one, a splash, and a new enemy at speeds[level]. The win checks level = 3 before startLevel, since a list of 3 has no place 3.
The Make is the biggest program so far (about 25 blocks): try it yourself first.
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.
Three students hold cards 40, 70 and 100, labelled with places 0, 1, 2. Call out a level; the matching card goes up.
Call level 3: no one moves. That is the crash after the last level.
On paper, design a fourth level: speed, colour and goal.
Places start at 0. When a level is off by one, ask which place the list starts at.
| What you will see | A question to ask | The fix |
|---|---|---|
| The splash says Level 0, or the speed is wrong by one level. | Where does the list start counting? | Places start at 0. The level starts at 0, and the splash shows level + 1. |
| The enemy stops, or the game breaks, after the last level. | What is speeds[3] when the list has 3 items? | There is no place 3. Check level = 3 and end the game (win) before calling startLevel. |
| Old enemies stay on the screen at the next level. | What does startLevel do first? | Add destroy all sprites of kind Enemy at the top of startLevel. |
One possible solution for each task. Other correct programs are fine.

let enemy: Sprite = null
let speeds = [40, 70, 100]
let colours = [9, 7, 2]
let level = 0
let goal = 5
function startLevel () {
sprites.destroyAllSpritesOfKind(SpriteKind.Enemy)
scene.setBackgroundColor(colours[level])
game.splash("Level " + (level + 1))
enemy = sprites.create(img`
a . . a
a a a a
a 1 1 a
a a a a
`, SpriteKind.Enemy)
enemy.setPosition(80, 10)
enemy.setVelocity(speeds[level], speeds[level])
enemy.setBounceOnWall(true)
}
let player = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(player)
player.setStayInScreen(true)
let coin = sprites.create(img`
. 5 5 .
5 5 4 5
5 4 5 5
. 5 5 .
`, SpriteKind.Food)
coin.setPosition(randint(10, 150), randint(10, 110))
info.setLife(3)
startLevel()
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
otherSprite.setPosition(randint(10, 150), randint(10, 110))
info.changeScoreBy(1)
if (info.score() >= goal) {
level += 1
goal += 5
if (level == 3) {
game.gameOver(true)
} else {
startLevel()
}
}
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.setPosition(80, 10)
})

let enemy: Sprite = null
let speeds = [40, 70, 100, 130]
let level = 0
let goal = 5
function startLevel () {
sprites.destroyAllSpritesOfKind(SpriteKind.Enemy)
game.splash("Level " + (level + 1))
enemy = sprites.create(img`
a . . a
a a a a
a 1 1 a
a a a a
`, SpriteKind.Enemy)
enemy.setPosition(80, 10)
enemy.setVelocity(speeds[level], speeds[level])
enemy.setBounceOnWall(true)
}
let player = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(player)
player.setStayInScreen(true)
let coin = sprites.create(img`
. 5 5 .
5 5 4 5
5 4 5 5
. 5 5 .
`, SpriteKind.Food)
coin.setPosition(randint(10, 150), randint(10, 110))
info.setLife(3)
startLevel()
sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSprite) {
otherSprite.setPosition(randint(10, 150), randint(10, 110))
info.changeScoreBy(1)
if (info.score() >= goal) {
level += 1
goal += 5
if (level == 4) {
game.gameOver(true)
} else {
startLevel()
}
}
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
info.changeLifeBy(-1)
otherSprite.setPosition(80, 10)
})

let rock: Sprite = null
let speeds = [-40, -70, -100]
let colours = [9, 4, 2]
let level = 0
let goal = 10
function startLevel () {
sprites.destroyAllSpritesOfKind(SpriteKind.Enemy)
scene.setBackgroundColor(colours[level])
game.splash("Level " + (level + 1))
}
let player = sprites.create(img`
. 4 4 .
4 4 4 4
. 8 8 .
. 8 8 .
`, SpriteKind.Player)
controller.moveSprite(player)
player.setStayInScreen(true)
info.setLife(3)
startLevel()
game.onUpdateInterval(1000, function () {
rock = sprites.create(img`
. e e .
e e e e
e e e e
. e e .
`, SpriteKind.Enemy)
rock.setPosition(160, randint(10, 110))
rock.vx = speeds[level]
info.changeScoreBy(1)
if (info.score() >= goal) {
level += 1
goal += 10
if (level == 3) {
game.gameOver(true)
} else {
startLevel()
}
}
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
otherSprite.destroy()
info.changeLifeBy(-1)
})
Open task: any program that does what the step asks.
Stretch: Add a third list, the number of enemies per level, and call your function from B3 that many times.
Support: Give students the Make game with the lists and startLevel already made, so they add only the level-up and the win.
speeds is 40, 70, 100 and level is 1. What speed does the enemy get, and why?
70: level 1 is the second place in the list, because places are counted from 0.
Next unit: power-ups, with true or false and things that run out. Skillmap: Jungle Jump Platformer (arcade.makecode.com/skillmaps) builds a level per map. Class idea: design a level table on paper (speed, colour, enemies, goal) before coding it.