Today you are coding in MakeCode Arcade. You will build Galaxy Ghosts at your device: a space shooter with falling ghosts, a speed variable, shots, score, a health bar and damage.
You can already move sprites and run a project. Before you build, think: what might make the ghosts get harder as the game goes on?
You will predict, build step by step, run, and fix as you go. Later you will change one number so the game feels hard but fair.
Galaxy Ghosts has six parts:
Run it after every part.
Open the MakeCode Arcade website using the link below and create a new project. You can call the project whatever you want.
Create a new Arcade project using the makecode.com website.
First let's create our player sprite.
Add the following code and choose the blue space ship sprite:
let mySprite: Sprite = null
mySprite = sprites.create(img`
. . . . . . . c d . . . . . . .
. . . . . . . c d . . . . . . .
. . . . . . . c d . . . . . . .
. . . . . . . c b . . . . . . .
. . . . . . . f f . . . . . . .
. . . . . . . c 6 . . . . . . .
. . . . . . . f f . . . . . . .
. . . . . . . 8 6 . . . . . . .
. . . . . . 8 8 9 8 . . . . . .
. . . . . . 8 6 9 8 . . . . . .
. . . . . c c c 8 8 8 . . . . .
. . . . 8 8 6 6 6 9 8 8 . . . .
. . 8 f f f c c e e f f 8 8 . .
. 8 8 8 8 8 8 6 6 6 6 9 6 8 8 .
8 8 8 8 8 8 8 8 6 6 6 9 6 6 8 8
8 8 8 8 8 8 8 8 6 6 6 6 9 6 8 8
`, SpriteKind.Player)
Click on the gray box in the sprite block to open the Editor. You can choose a sprite from the Gallery or you can paint your own sprite using the Editor.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.