top of page

Basic Game

  • The cat continuously falls but flies up again when the space bar is pressed. If the cat hits any of the pipes or the ground, the player loses.

  • Teaches:

    • Gravity

    • Review of cloning

    • Review of sprites moving from one edge of the screen to the other

  • Start by applying gravity to the cat. There’s a gravity variable that starts off negative and constantly gets more negative. The y- position of the sprite constantly changes by that y-value. When the space bar is pressed, the gravity variable is set to a positive value, so the sprite flies up a bit, but then falls again because the variable is always getting more negative.

  • Make pipes that move across the screen.

    • Encourage the kids to use clones. Have a hidden master pipe sprite and the clones that move across the screen to delete themselves at the end.

  • Make the sprite lose if it touches the pipes.

  • Make the sprite lose if it touches the floor

Lesson 6 

  • Make a score variable that increases every time the sprite passes another pipe. (Hint: the sprite stays in the same x-position for the whole game, so it passed a pipe when the pipe’s x-position is past the sprite’s).

  • Create a starting screen (“Hit space to play!”), so that the sprite doesn’t fall to the ground as soon as the game starts.

Scratch is developed by the Lifelong Kindergarten  Group at the MIT Media Lab. See http://scratch.mit.edu.

Flappy Cat
Challenges
bottom of page