Before we begin, here’s a tip on the Scratch stage size:

GO TO THE TOP

  • Choose a Backdrop
  • Choose a Sprite (in my example I’m using an apple)
  • Start from a random spot at the top of the stage
  • Set Y to 180 (= top of stage)

FALL DOWN

  • add blocks inside flag already have
  • Negative # so falls down
  • Check Y position, if near bottom of stage (-170)

MOVE THE CATCHER

  • New sprite to catch falling object
  • Left & Right arrow keys
  • Inside 2 IF-THEN blocks

CATCH IT!

  • Apple/falling object sprite
  • Add another “Flag clicked” event

KEEP SCORE

  • First make a new variable – name it “Score”
  • Add inside sensing Flag block

If you test your game, you should see the score going up.

BONUS POINTS

  • Duplicate apple sprite
  • Costumes> change fill color 
  • Change how many points for Change Score

YOU WIN!

  • Make a new sprite – add text – resize (see on canvas)
  • On text sprite, show/hide this sprite until score is 10, then stop the falling sprites

This is from another online source…

Change background

Go to import a background to add the ‘Blue Sky’ image.

We get the following background:

Creation of the sprite bowl (container):

Go to Choose a Sprite to add the Bowl image.

Choose the Bowl image:

Inserting programs:

On board, we create the variable abscisse_x.

When the green flag is clicked, the program puts the sprite bowl in the background and assigns the value of the abscissa of the sprite bowl in the variable abscisse_x to use it in the apple sprite.

We want the sprite bowl (container) to be able to move from side to side with the arrow keys (right and left), so that it can catch anything that will fall.

Here is the final program:

Creating the apple sprite:

Go to Upload Sprite to add the apple image.

Choose the apple image:

Inserting the apple sprite program:

We create the variable score.

We also create another variable named pas.

When the green flag is clicked:

– we assign the value 0 to the score variable:

– we hide the apple sprite :

– Finally we create a copy of the apple sprite:

When a clone of the apple sprite is created:

– We display the copy of the apple sprite on the stage:

– We place the copy of the apple sprite on the stage in a random way:

– Then the copy of the apple sprite starts falling towards the ground until it hits the sprite bowl or the ground

If the copy of the apple sprite touches the sprite bowl:

1. We increment the score variable by 1

2. We create another copy of the apple sprite which will execute the previous program.

3. We put the copy of the sprite apple in the sprite bowl by assigning the coordinates of the sprite bowl to the sprite apple.

If the copy of the apple sprite hits the ground, the game is over.

Finally here is the final program of the apple sprite: