Hey there, young coder! Today, we’re going to create a fun game called "Catch the Fruit" using Scratch 3.0 on a tablet. Imagine you’re a farmer trying to catch falling apples in a basket—sounds fun, right? Let’s build it step by step!
Think of coding like building a house:
First, we set up the foundation (choose characters and background).
Next, we build the walls (make the basket move).
Finally, we decorate it (add fun effects like sounds and points).
Now let's go
Step 1: Set Up the Game
Pick Your Characters (Sprites)
1. Open Scratch 3.0 on your tablet.
2. Delete the cat by clicking on it and pressing the trash can.
3. Tap Choose a Sprite, then add:
🍏 Apple (for the falling fruit).
🥣 Bowl (to catch the fruit).
Think of sprites as actors in your game!
Choose a Background
1. Tap the Backdrops button.
2. Pick a nice outdoor scene—maybe a farm or a blue sky!
This is like painting the walls of our house!
Step 2: Make the Basket Move
We need to control the basket by touching and dragging it left or right.
Add This Code to the Basket (Bowl)
1. Click on the Bowl sprite.
2. Go to the Code section and add these blocks:
Code Snippets
when green flag clicked
forever
if <mouse down?> then
if <mouse x > x position> then
change x by (10)
end
if <mouse x < x position> then
change x by (-10)
end
end
🔹 What this does:
When you tap the screen, the basket follows your finger.
If your finger moves right, the basket slides right.
If your finger moves left, the basket slides left.
🎮 It’s like controlling a car—steer left or right!
Step 3: Make the Apple Fall
Now, let’s make the apple drop from the sky like real fruit falling from a tree! 🌳
Add This Code to the Apple
1. Click on the Apple sprite.
2. Drag these blocks:
Code snippets
when green flag clicked
forever
set y to (170)
go to random position
repeat until <touching Bowl>
change y by (-10)
end
go to random position
🍏 What this does:
The apple starts at the top.
It falls downward until it touches the basket.
Then, it goes back up to fall again.
Think of this like throwing a ball in the air—it comes back down!
Step 4: Keep Score!
What’s a game without points? Let’s add a score counter!
Make a Score Variable
1. Go to Variables.
2. Tap Make a Variable, name it Score.
3. Add this block to the Apple sprite:
if <touching Bowl> then
change [Score] by (1)
Wait one sec
🏆 What this does:
When the basket catches the apple, the score increases by 1.
The apple goes back to the top to fall again.
🎯 It’s like a basketball game—score when you catch the fruit!
Step 5: Make It More Fun! 🎉
Now, let’s customize the game to make it even better! Try these ideas:
✅ Add More Fruits 🍌🍇—Different fruits can fall at different speeds!
✅ Add Sounds 🎵—Play a “ding” when you catch a fruit!
✅ Add a Timer ⏳—Make the game last 30 seconds!
Your Turn! 🚀
Now that you’ve built the Catch the Fruit game, what fun features will you add?
👉 Try adding a banana or a time limit and share your game idea below!
🎉 Great job, coder! Keep experimenting and having fun. Remember, coding is like magic—you can create anything you imagine! ✨
Happy coding! 🚀
Comments
Post a Comment
Thank you