Star Student Builder logoStar Student Builder
← Animation and First Games Std 3–5Project 2 of 4

Catch the Falling Apples

🎯 Apples fall from the top; move the basket with the arrow keys to catch them. Each catch scores a point.

πŸ’‘ The idea behind it

A game is a loop that checks for things happening β€” and a variable that remembers what happened.

🧱 Blocks you will need

foreverif touching?go to x: y:pick randomset score to 0change score by 1key pressed?

πŸ”¨ Build it

  1. Make a variable called score. Set it to 0 when the flag is clicked β€” this matters more than it looks.
  2. The basket: forever β†’ if key right arrow pressed, change x by 10; if left arrow pressed, change x by βˆ’10.
  3. The apple: go to x (pick random βˆ’220 to 220) y 180, then forever β†’ change y by βˆ’5.
  4. Inside that loop: if touching basket β†’ change score by 1 β†’ go back to the top at a new random x.
  5. Also: if y position < βˆ’170, go back to the top without scoring β€” a missed apple.

πŸš€ Make it harder

  • Add a lives variable that goes down when an apple is missed, and stop the game at zero.
  • Make the apples speed up as the score rises.

🐞 Bugs you will hit

  • The score keeps growing from the last game: you forgot 'set score to 0' at the start.
  • One apple scores many points: it must move away immediately after touching, in the same if block.
  • The basket moves in jerks: use 'change x by' inside a forever loop rather than the 'when key pressed' event.

⬇ Need Scratch itself?

Free from MIT, in a browser or as an offline app that needs no connection at all.

Get it β†’
Ask GuruAcharya Samayeshwar