Scratch Game Development: Creating an Egg Catching Game – A Step-by-Step Tutorial for Beginners

Here’s the English translation of the provided text:
INTRODUCTION
The egg catching game in Scratch is an excellent project for beginners. In this game, players control a basket moving horizontally to catch eggs falling from above. Each caught egg increases the score, while eggs falling out will reduce lives. This project helps learn basic programming concepts such as: event handling, collision detection, variables, and loops.
LET’S PLAY
Click on the green flag to start. Use arrow keys to move and catch eggs.
PART 1: CHARACTER AND BACKGROUND SETUP
Step 1: Create the playground background
- Click on the “Choose a backdrop” icon in the bottom right corner
- Find a suitable background or draw your own Tips:
- Choose a simple background from the internet to avoid distracting the player
- Create a boundary line at the bottom representing the ground
Step 2: Create the basket sprite
- Delete the default cat sprite
- Click on the “Choose a sprite” icon at the bottom
- You can:
- Choose from the library (search for “basket” or “bowl”)
- Draw your own sprite using Paint Editor
-
- Adjust the basket size as appropriate (click on the “Size” tool and set a suitable value)
Step 3: Create the egg sprite
- Click on the “Choose a sprite” icon
- Search for “egg”, draw a simple egg, or upload your own egg here. Adjust the egg size to match the basket
PART 2: PROGRAMMING BASKET CONTROL
Step 1: Set initial position
- Select the basket sprite
- Go to the “Code” tab
- Add block: When green flag clicked Set y position to (-155): The purpose is to fix the basket’s height so it only moves horizontally
Step 2: Program horizontal movement
- Add loop and condition blocks:
Forever
If <key [right arrow v] pressed?> then
Change x by (10)
End
If <key [left arrow v] pressed?> then
Change x by (-10)
End
Tip: You can adjust the values 10 and -10 as desired according to how fast or slow you want the basket to move when pressing the arrow keys.
Step 3: Movement limits
- Add conditions to prevent the basket from moving off-screen: When we press too far to the left or right, it’s not possible.
If <(x) > (230)> then
Set x to (230)
End
If <(x) < (-230)> then
Set x to (-230)
End
PART 3: PROGRAMMING FALLING EGGS
Step 1: Create variables
- Click on the “Variables” tab
- Create a “Score” variable for all sprites
- Create a “Lives” variable for all sprites
Step 2: Set initial values
-
- Select the egg sprite
- Add blocks:

When green flag clicked
Hide
Set [Score v] to (0)
Set [Lives v] to (3)
Step 3: Program egg clone creation
- Add blocks to create egg clones: Add command to change egg color
When green flag clicked
Hide
Forever
Create clone of [myself v]
Wait (2)
Step 4: Program egg behavior
- Add blocks for the egg clone:
When I start as a clone
Show
Set x position to (random number from (-230) to (230)) y: (180)
Forever
Change y by a random amount from -1 to -10
If <touching [Basket v]?> then
Change [Score v] by (1)
Play sound [pop v]
Delete this clone
End
If <(y) < (-170)> then
Change [Lives v] by (-1)
Play sound [whoop v]
Delete this clone
End
PART 4: SETTING UP GAME CONDITIONS
Step 1: Program game end
- Select egg sprite
- Add blocks:
When green flag clicked
Forever
If <(Lives) < (1)> then
Stop [all v]
Show GAME OVER screen
End
Step 2: Increase difficulty based on score
- Add blocks:
When green flag clicked
Forever
If <(Score) > (10)> then
Set [Level v] to (2)
End
If <(Score) > (20)> then
Set [Level v] to (3)
End
If <(Score) > (30)> then
Set [Level v] to (4)
End
Step 3: Create end screen
- Create a new sprite (like “Game Over”)
- Program:
When green flag clicked
Hide
Forever
If <(Lives) < (1)> then
Show
End

PART 5: ENHANCING THE GAME
Step 1: Add sound effects
-
- Download additional sounds for events such as:
- Catching an egg
- Losing an egg
- Starting the game
- Ending the game
- Leveling up
- Download additional sounds for events such as:
Step 2: Add special items
- Create an “extra life egg” sprite (can use a green egg image)
- Program:
When green flag clicked
Hide
Forever
Wait (random number from (15) to (30)) seconds
Create clone of [myself v]
When I start as a clone
Show
Set x position to (random number from (-230) to (230)) y: (180)
Forever
Change y by (-3)
If <touching [Basket v]?> then
Change [Lives v] by (1)
Play sound [powerup v]
Delete this clone
End
If <(y) < (-170)> then
Delete this clone
End
PART 6: SAVING AND SHARING
Step 1: Save the project
- Click on “File” in the top left corner
- Select “Save” or “Save as”
- Name your project (e.g., “Egg Catching Game”)
Step 2: Test and refine
- Click the green flag to run the game
- Check the features:
- Basket moves correctly
- Eggs fall and interact properly
- Score and lives are calculated correctly
- Difficulty increases gradually
- Edit if necessary
Step 3: Share the project (optional)
- Click on “Share” in the top right corner
- Add playing instructions in the description
- Add relevant tags (e.g., game, egg, catch)
EXPANSION AND CREATIVITY
After completing the basic version, you can add the following features:
- Different game modes: Add “time” or “high score” modes
- Special effects: Add visual effects when catching eggs
- Add obstacles: Add objects to avoid
- Start and end screens: Create a complete user interface
- Save high scores: Use “cloud” variables to save high scores
- Customize characters: Allow players to choose different baskets
TIPS AND TRICKS
- Test frequently: Check after each section to ensure everything works correctly
- Use comments: Add comments to code to help you remember what each part does
- Optimize: If the game is slow, reduce the number of clones or effects
- Control difficulty: Ensure difficulty increases gradually so the game is neither too easy nor too hard
- Backup: Use “Save as copy” frequently to avoid data loss
CONCLUSION
Congratulations! You have successfully created an egg catching game in Scratch. This project has helped you learn basic programming concepts such as loops, conditions, variables, and collision detection. Continue to explore and expand your game with new features and creativity!