Cat and Mouse Game in Scratch

Cat and Mouse Game in Scratch

More on teaching scratch to beginners, I usually start off with building this game in Scratch.

It shows off all the important capabilities of the platform in a digestable form. The cast moves around the screen and tries to "catch" the player's mouse pointer (because puns), scores a point for each time it does, and the game ends when you reach a particular score.

game

The game, as it is built up in stages, demonstrates:

  • Moving across the screen in terms of x and y
  • Moving by different amounts
  • Using a variable to represent the amount of movement
  • Forever loops
  • What to do at the edge of the screen
  • Turning the sprite around
  • Animating movement using costumes
  • Moving towards another location without maths
  • Touching logic and branching
  • Global variables for score and win
  • Stopping the game

Game

code