This tutorial will teach you how to make a simple dodging game in Scratch, where a player avoids flying ducks and collects silver ducks to earn points.
This project is highly recommended for intermediate Scratchers, and teaches the concepts of clones, messages and smooth movement. If you’re already a Scratch pro, you can still grab cool ideas for effects, clone logic, and collision handling.
The main character is a cute pixel-art Grandpa. He’ll follow the mouse smoothly using a smart bit of math:
This creates smooth motion that feels natural and responsive.
We also make sure he only rotates left and right with this simple block:
The challenge? Ducks falling from the sky! Some are just regular ducks, but the rare silver one is a collectible coin.
Here’s how it works:
This part uses these blocks of Scratch:
and
Essential blocks for making any sort of repeated, randomized spawns in Scratch.
When ducks hit the ground, they fade out with visual effects, a great final touch that adds polish:
repeat 10
change size by 5
change ghost effect by 10
change brightness by 10
If a regular duck touches the player, the game ends with a broadcast:
broadcast [game over v]
stop [all v]
But silver ducks? They’re safe! Just a nice bonus that increases the score.
You’ll even learn to fix a common bug where silver ducks incorrectly trigger game over, using:
if <costume number = 1 or costume number = 2> then
broadcast [game over v]
The best part of this project is watching it come to life on screen, in just a few minutes!
Click here to watch the full video tutorial on YouTube
Once you’ve learned the basics of this game, it becomes a great starting point for customizing and making it your own.
Subscribe to our YouTube channel for more Scratch projects and tutorials, that help explore programming in creative and effective ways. New tutorials are posted regularly!