+21622886281
Game Scratch

Catch apples with Scratch

A catch apples game is a type of video game in which the player controls a character who must catch falling apples or other objects. The objective of the game is typically to catch as many objects as possible while avoiding letting any objects fall to the ground.

To create a catch apples game using Scratch, you will need to create a background image or series of images that represent the game environment, and create a sprite that represents the player’s character. You can then use the Scratch blocks to make the character move and control its direction, and use blocks such as the “when space key pressed” block to allow the player to catch the objects. You can also create additional sprites to represent the falling objects, and use blocks such as the “if on edge, bounce” block to make the objects fall from the top of the screen and bounce off the sides.

To make the game more challenging, you can increase the speed at which the objects fall, or add additional objects that the player must avoid catching. You can also use blocks to keep track of the player’s score and end the game when a certain number of objects have been caught or missed.

Description of Apple Catch Game with Scratch:

We are going to create a game where the player uses a container to catch falling apples to prevent them from reaching the ground.

First we create a copy of the apple sprite with the create clone function and drop the apple sprite down.

If the apple (sprite apple) falls into the container:

  • we add a point

  • we put the sprite apple in the sprite bowl (container)

  • the game starts again with another copy of the apple sprite

If the user misses the apple, the game ends.

Change background

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

2) We get the following background:

Creation of the sprite bowl (container):

1) Go to Choose a Sprite to add the Bowl image.

2) Choose the Bowl image:

3) 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:

1) Go to Upload Sprite to add the apple image.

2) Choose the apple image:

3) 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:




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top