How to Make Flappy Bird in Scratch (And Play It With a Banana!)

by pauldobrowski in Circuits > Electronics

706 Views, 3 Favorites, 0 Comments

How to Make Flappy Bird in Scratch (And Play It With a Banana!)

IMG_4961.JPG

In this instructable, you will learn how to make a Flappy Bird game in Scratch, hook it up to a Makey Makey, and play it with a banana (or any other organic object).

Supplies

You will need:

-A Scratch account

-A Makey Makey

-An adapter if your laptop doesn't use USB

-A banana or any other organic object

Creating the Sprites

Screenshot 2023-02-19 at 11.09.48 AM.png

(Above is a key to help you to navigate the window) First, we have to make the sprites. There is a bird sprite, a pipe sprite, and a game-over sprite. You will also need to set the backdrop to a blue color for the sky. You can upload a sprite from your computer or the Scratch database, or design your own in the costumes tab. You can name your sprites to make it easier to keep track of them.



Sprite: An image that can be programmed to move, respond to events, and interact with other sprites.

Coding for the Bird Sprite

Screenshot 2023-02-19 at 12.00.15 PM.png

All of the tabs are the same color as the blocks within them, so you can figure out where to get the different blocks from by color. The 'gravity' and 'game on?' blocks are variables, so you will have to make them yourself. Go to the orange variables tab, press 'create a new variable', then name it, and make sure it is for all sprites. A blue check mark will appear next to it and you can un-select it.

Coding for the Pipe Sprite

Screenshot 2023-02-19 at 12.00.30 PM.png

Select the Pipe sprite and begin coding. You will have to make another variable called score, but this time, make sure the check mark is selected, so you can see your score. You can move the score to the place you want it, and click it to make it bigger (if you click twice by mistake, just keep clicking until it cycles back around again.)

Coding for the Game Over Sprite

Screenshot 2023-02-19 at 12.00.36 PM.png

Hooking Up the Makey Makey

IMG_4863.JPG
  1. Plug the red cable into the Makey Makey.
  2. Attach the end of the yellow alligator clip to the tip of the banana.
  3. Attach the other end of the yellow alligator clip to the 'space' holes on the Makey Makey
  4. Attach the green alligator clip to one of the 'earth' holes. (MAKE SURE TO HOLD THE TIP WHILE PLAYING!)
  5. If needed, connect the other end of the red cable to an adaptor.
  6. Plug the red cable or adapter into your computer.

If any popups come, close them. You don't need them.

Downloads

Enjoy!

IMG_B485666E14AF-1 2.jpeg

Have fun!

Downloads