Make a Flappy Bird Game Using Scratch

Scratch is a great tool for kids to learn how to code and it’s completely free! Anyone can use Scratch to make fun games, stories, and animations by dragging and dropping different blocks of code. It’s really easy to use and perfect for beginners who want to be creative and solve problems with coding.

Make a Flappy Bird Game Using Scratch

  1. Login to Scratch
  2. Create a New Project
  3. Name Your New Project
  4. Choose a Backdrop
  5. Choose a Sprite
  6. Resize and position the sprite
  7. Add the first code block
  8. Set the sprite’s starting position
  9. Add gravity to the game
  10. Make gravity slower
  11. Make the bird fly up
  12. Design the Game’s Obstacle
  13. Animate the Obstacle
  14. Randomly Position the Obstacle
  15. End the Game Upon Collision
  16. Test your game!

1. Login to Scratch

Login to scratch to build flappy bird

2. Create a New Project

  • Once you are logged in, click the blue Create button at the top of the page.
create a new scratch project

3. Name Your New Project

  • Give your project a name, for example, “Flappy Bird Game”.
  • Then delete the Scratch cat by clicking the trash can icon next to the sprite.
How to Make Flappy Bird on Scratch Name your project

4. Choose a Backdrop

  • Select the Choose a Backdrop option at the bottom right-hand side of your screen.
choose a backdrop
  • When the Choose a Backdrop screen opens up, select a background for your Flappy Bird game. In this tutorial, I chose “Jungle”, but you can choose whatever you’d like!
Choose a backdrop

5. Choose a Sprite

  • Then, go to the Choose a Sprite option, which is next to the “Choose a Backdrop” section.
Choose a sprite
  • Select a bird sprite of your choosing. We selected the Parrot sprite, which is suggested if you want to create a flapping motion for the character.
select parrot sprite

6. Resize and position the sprite

  • Resize your sprite by changing the Size textbox, we changed it to 50 in this tutorial.
  • Then, click and drag the sprite shown to the left of the game, since the pipes will be moving from the right to the left.
How to Make Flappy Bird on Scratch resize and position scratch sprite

7. Add the first code block

  • Go to the Events category, then click and drag a when green flag clicked events block into your code area.
Add when green flag clicked

8. Set the sprite’s starting position

  • Go to the Motion category and drag a go to x and y block under your when green flag clicked block. This will make sure the player begins at the same place every time the game is loaded.
How to Make Flappy Bird on Scratch Set sprite position

9. Add gravity to the game

  • Then, in the Control block category, drag a forever block and attach it under the go to x and y block.
Add gravity to game
  • Go back up to the Motion category and get a change by y motion block, then drag it directly into the forever block.
  • Change the value in the textbox of the change by y block to -15. Now when you press the green flag icon above your game, the bird will drop really fast!
Add change position block

10. Make gravity slower

  • To fix the bird from falling so quickly, put a wait block from the Control category before the change y by block.
  • Change the value in the textbox to about 0.1.
Slow down gravity

11. Make the bird fly up

  • Now let’s make it so the player can interact with the game! Grab a when space key pressed block from the Events category and drag it into the code area.
How to Make Flappy Bird on Scratch When space key pressed block
  • Go to the Motion category and get a change y by block and put it below the when space key pressed block. Now the player can make the bird fly up! NOTE: Check out the bonus after this tutorial which will show you how to make the bird’s wings flap as they fly.
Motion block

12. Design the Game’s Obstacle

  • Click on the paint option from the New Sprite button to create a pipe sprite.
scratch game obstacle
  • Select a color of your choice from the Fill option, then select the square from the list of tools.
Draw obstacles
  • Click and drag the square to create two pillars or tubes that will be obstacles for the game. Reposition and resize the pipes as needed.
draw obstacles

13. Animate the Obstacle

  • Click on the Code tab and drag a when green flag clicked block from the Events category into the code area. Attach a forever block from the Control category.
How to Make Flappy Bird on Scratch animate scratch obstacle
  • Next, go the the Motion category and drag a set y to block, set x to block, and a glide to x and y block inside the forever block.
  • In the set x to block, change the textbox to say 275. This makes it so the pipes will start on the right side of the screen!
animate scratch motion block
  • Update the glide block to glide for 2 seconds and change the x value to -275, so that it moves to the left of the screen.
  • Then, in the Motion category, drag a y position block inside of the y value in the glide block.
glide block

14. Randomly Position the Obstacle

  • Test your project, you’ll notice that the pipes stay at the same position every time they move toward the player.
  • To fix this, go to the Operators category and grab a pick random block and drag it into the set y to block.
  • Change its values to something like -65 and 65.
position obstacles in scratch

15. End the Game Upon Collision

  • Nothing happens when the parrot collides with the pipe! Let’s get a when green flag clicked block from the Events category and a forever block from the Control category to set this up.
How to Make Flappy Bird on Scratch game collision in scratch
  • From the Control category, get an if then block and put it inside the forever block.
game collision in scratch
  • Then, go to the sensing category and get a touching mouse-pointer block. Drag that into the if then block.
  • Click the mouse-pointer option to change it to Parrot instead
if then block
  • Go to the Control category and get a stop all block and put that inside the if then block. This will stop the game when the Parrot and pipes collide!
if then block

16. Test your game!

  • The game should stop when the bird collides with the pipes. Check out the completed project here.
completed flappy bird scratch game


Bonus 1 – Adds a points system

1. Create a variable

  • In your Flappy Bird Project, go to the Variables category and right-click on the variable called my variable. It’s right below the Make a Variable button.
  • Then, select the Rename Variable option.
bonus 1 step 1 flappy bird

 

2. Name the variable

  • In the popup window, type score for the name, then click OK.
bonus 1 step 2 flappy bird

3. Display the Score

  • Then, click the checkbox next to the score variable. This makes the score show up in your game.
bonus 1 step 3 flappy bird

4. Update the score

  • Then, in the Variables category, drag a set score to 0 block right under the when green flag clicked block.
  • Also get a change score by 1 block and put it under the glide block.
bonus 1 step 4 flappy bird

5. Test the game!

  • Test your game, you should be able to get a score now when you play the game

 

Bonus 2 – Make the bird’s wings move as you play the game

1. Select the Sprite

  • First, make sure you click the Parrot sprite from the sprites list.
bonus 2 step 1 flappy bird

2. Switch the Sprite’s costume

  • Go to the Looks category and grab a switch costume block for inside the forever block and under the when space key pressed block.
  • Make sure that you are using parrot-a in the forever block and parrot-b under the when space key pressed block.
bonus 2 step 2 flappy bird

3. Test the Game

  • Do your Parrot’s wings flap? Then, your project is complete, great job!
bonus 2 step3 flappy bird

2 Comments

  • Samuel March 29, 2025

    i love this

  • Jesse July 26, 2025

    I love this

Leave a Reply

Your email address will not be published. Required fields are marked *