how to make flappy bird in scratch

How to Create Flappy Bird in Scratch

By Hannah Taylor
AD

Fancy creating your own version of the popular mobile game, Flappy Bird, but on a simpler platform? Scratch, a visual programming language developed by MIT, is a fantastic tool for beginners to dive into game development. In this guide, we'll walk you through the process of creating Flappy Bird in Scratch, step by step.

Before we begin, make sure you have Scratch online or offline version set up and ready to go. Also, having a basic understanding of Scratch blocks and their functions will be helpful. Now, let's get started!

Setting Up the Stage

First, let's create the basic layout of our Flappy Bird game.

AD
How to Make Flappy Bird in Scratch (And Play It With a Banana!)
How to Make Flappy Bird in Scratch (And Play It With a Banana!)
an image of a computer screen with the words flappybird on it
an image of a computer screen with the words flappybird on it
Flappy Bird Scratch Game Tutorial for Beginners
Flappy Bird Scratch Game Tutorial for Beginners

1. **Create a New Project**: Click on 'New Project' and name it 'Flappy Bird' in the top left corner.

Stage Properties

2. **Set Stage Properties**: Set the stage backdrop to 'Flags' or any other backdrop you like. For this example, we'll use 'Flags'.

the flappy bird game is shown in this screenshot
the flappy bird game is shown in this screenshot
Flappy bird using python 🤩🤩
Flappy bird using python 🤩🤩
Microbit Flappy Bird
Microbit Flappy Bird

3. **Change Stage Size**: Resize your stage to 320x480 pixels to match the aspect ratio of the original Flappy Bird game.

Add Sprites

4. **Add Sprites**: Import a bird sprite by dragging it from the sprite library onto the stage. You can use the classic 'Bird' sprite or upload your own flappy bird sprite.

AD

5. **Add Pipe Sprites**: Import two pipe sprites (one for the top and one for the bottom) from the sprite library. For this, you can use the 'Kitchen Timer' sprite and modify its appearance.

an old - school video game is playing on the nintendo wii, and it's very
an old - school video game is playing on the nintendo wii, and it's very
Flappy Bird Animation
Flappy Bird Animation
Pixilart - flappy bird gif
Pixilart - flappy bird gif
Tutorial Free Download mobile _ Flappy Bird
Tutorial Free Download mobile _ Flappy Bird
Scratch 3.0 Tutorial: How to Make a Flappy Bird Game in Scratch (Part 4)
Scratch 3.0 Tutorial: How to Make a Flappy Bird Game in Scratch (Part 4)
Flappy Bird
Flappy Bird

Programming the Bird

Now, let's code the bird's movement and bird's collision with the pipes.

Bird Movement

6. **Jumping Movement**: Click on your bird sprite and drag out the 'when green flag clicked' block from the events menu. Add 'jump 10 pixels' block from the motion menu to make the bird jump when the game starts.

AD

Gravity

7. **Apply Gravity**: Add a 'repeat 1' loop block under the 'when green flag clicked' block. Inside this loop, add 'change y by 10' from the motion menu to make the bird fall down due to gravity.

Flappy Bird Game in Scratch – Coding / Programming Task 6th-11th Grade
Flappy Bird Game in Scratch – Coding / Programming Task 6th-11th Grade
the flappy bird game is being played on the nintendo wii, and it's very
the flappy bird game is being played on the nintendo wii, and it's very

Creating Pipes

Let's create the pipes that the bird needs to avoid.

Pipe Movement

8. **Moving Pipes**: Create another sprite for the pipe and repeat steps 6 and 7, but with 'move 5 pixels' instead of 'jump 10 pixels' to make the pipe move to the left.

AD

Pipe Spawning

9. **Spawning Pipes**: To create the pipe-spawning effect, add a 'when I receive a [x]' message block to your pipe sprite. When this message is received, spawn a new pipe at the right side of the stage and move it to the left.

Game Over Condition

Finally, let's add the winning and losing conditions to make the game complete.

Bird-Pipe Collision

10. **Game Over on Collision**: Add a 'when I touch the edge of the stage' block to your bird sprite. Inside this block, add a 'hide' block to make the bird disappear when it hits the boundary. This will serve as our game over condition.

Bird-Pipe Collision

11. **Game Over on Pipe Touch**: Also, add a 'when I receive a [semplates]' message block to your bird sprite. If the bird touches a pipe, the sprite will receive this message, and the game will stop.

And there you have it! Your very own Flappy Bird game is now ready to play in Scratch. Stretch your imagination further by adding scores, multiple lives, or even more obstacle types. Happy coding!

AD