New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
Programming› Scratch› Your First Scratch Game

Your First Scratch Game

🧩 Scratch

Bring everything together in a catch-the-ball mini game.

Lesson 4 of 4 Project
0 of 4 completed

Your First Game

Let us build a simple catch the ball game using events, loops and conditionals.

  1. The catcher: Pick a paddle sprite and make it follow the mouse:
    when ▼ clicked → forever → go to (mouse-pointer)
  2. The ball: Add a ball sprite that falls:
    when ▼ clicked → go to x:0 y:180 → forever → change y by -5
  3. Bounce it back:
    if (touching (paddle)) then → change y by 5 → change score by 1
  4. Keep score: from the orange Variables palette, make a variable named score.
Pro tip: use pick random -240 to 240 for the ball's x position each time it bounces so the game stays interesting.

Where to Build It

Use Block Studio to prototype your blocks, or install the free Scratch editor. Share your finished game with your class!

Challenge

Add a second ball, or a "Game Over" when the ball touches the bottom edge (if y position < -180 then).

Lesson Nav

Lesson sections