Scratch lesson 10 of 10 · Intermediate · About 50–60 minutes
Build a catch-and-dodge arcade project, then use a custom block with a speed input to make the game harder as the score rises.
What you’ll make Make a playable arcade game. Catch six falling stars to win before three escape, with a faster drop after the third catch.
Get ready
Open the Scratch editor (opens in a new tab) and start a new project.
- Start a new Scratch project. Paint a wide paddle about 80 pixels across and 16 pixels high, centred over the crosshair in the Costumes editor. Name the sprite Paddle. Paint or choose a small star and call it Star.
- Make three Stage backdrops called Arcade, You win and Try again. Add a short replay instruction to each ending backdrop. Make Score and Misses in Variables for all sprites so the Stage and both sprites can read them.
To keep your project, choose File → Save to your computer in Scratch.

Build it in Scratch
Choose the sprite named above each stack. The colours help you find the block categories. Indented rows sit inside the block above. Follow the end marker to see where each loop or condition closes.
1. Reset the score and choose the opening screen
Select the Stage and add the starting script. Create the Get ready and Play broadcasts from the Events menu. The first message sets the sprites up. The second starts the code for the falling star and the paddle together.
when green flag clickedswitch backdrop to [Arcade]set [Score] to (0)set [Misses] to (0)broadcast [Get ready] and waitbroadcast [Play]2. Put the paddle and star in their starting states
Give each sprite a short receiver for Get ready. Put the first script on Paddle. Put the second on Star so a star left over from the previous game is hidden until the next drop. The gap in the block diagram separates the two scripts.
when I receive [Get ready]go to x: (0) y: (-135)showwhen I receive [Get ready]hide3. Slide the paddle left and right
On Paddle, add a Play receiver. Each direction requires the correct arrow key and enough room to move. Use the two green comparison blocks inside the green and blocks. The loop stops when you win or run out of chances.
when I receive [Play]repeat until <<(Score) = (6)> or <(Misses) = (3)>>if <<key [left arrow] pressed?> and <(x position) > (-184)>> thenchange x by (-6)if <<key [right arrow] pressed?> and <(x position) < (184)>> thenchange x by (6)hide4. Make a custom block that drops one star
Select Star. In My Blocks, choose Make a Block and name it drop at speed. Choose Add an input (number or text), name it speed and leave Run without screen refresh unticked. Under the new define block, drag the speed input from the hat into the subtraction block. Each call drops one star from a random position. It checks whether it hit Paddle or went below it, then adds exactly one catch or one miss.
define drop at speed (speed)go to x: (pick random (-170) to (170)) y: (145)showrepeat until <<touching [Paddle]?> or <(y position) < (-155)>>change y by ((0) - (speed))if <touching [Paddle]?> thenchange [Score] by (1)elsechange [Misses] by (1)hide5. Speed up after three catches
Still on Star, add a separate script that calls the custom block. Drag it from My Blocks twice. Type 4 in the first caller and 7 in the second. The number you pass becomes speed while the block runs. Each drop finishes before the repeat loop starts another one.
when I receive [Play]repeat until <<(Score) = (6)> or <(Misses) = (3)>>if <(Score) < (3)> thendrop at speed (4)elsedrop at speed (7)broadcast [Game over]6. Finish and replay
On the Stage, add the Game over receiver. Use the score to choose the ending. The star has already hidden itself after its last drop and the paddle hides when its loop ends. Use the flag to reset both counters and try again.
when I receive [Game over]if <(Score) = (6)> thenswitch backdrop to [You win]elseswitch backdrop to [Try again]Test your project
- Temporarily replace the random x block in Star's custom block with 0. Leave Paddle in the middle to test six catches. Watch the drops get quicker after the third catch.
- Restart with the same test position. Move Paddle well to one side and check that three stars count as three misses and show Try again. Restore the random x block afterwards.
- Click the flag during a drop. Check that both numbers go back to zero and Paddle returns to the middle.
- Ask someone else to play. See whether they can explain the controls and work out when the star gets faster.
If something goes wrong
- The star jumps to its final position.
- Edit your custom block and make sure Run without screen refresh is unticked. This gives Scratch time to draw each falling step.
- Both difficulty settings feel the same.
- Check that your change-y block uses 0 minus the oval speed input from define. The two callers should pass 4 and 7.
- The star reaches the paddle but a catch is missed.
- Check that Sensing says touching Paddle and that the Paddle costume is centred. Use the fixed x test to check a drop directly above it.
Make it your own
- Change the artwork to make it your own. Try a fishing boat catching drops, or a tray catching cupcakes.
- Make a gentle mode that passes 2 and 4 as the drop speeds. Play each version and choose which one is better for a first-time player.
What you’ve learned A custom block names a job that your program can reuse. An input lets you change how it runs each time without rewriting the blocks inside.