Book Image

Raspberry Pi Gaming

By : Shea Silverman
Book Image

Raspberry Pi Gaming

By: Shea Silverman

Overview of this book

Table of Contents (16 chapters)

Let's build a Flappy Bird clone!

Your first game is going to be a Flappy Bird clone. While this might seem like a complicated task, it really can be broken down to a few easy scripts.


Flappy Bird is a great starting game. It has a clear objective, uses much of the Scratch functionality, is relatively simple to create, and you can use your imagination by drawing your own sprites, backgrounds, and pipes.

What kind of a game is Flappy Bird? It is a game where your goal is to keep on pressing a button to make a bird rise as it is constantly falling while navigating its way through the pipes of varying heights that are coming at it.

It can be broken down as follows:

  • Every button press makes the bird go up on the y axis

  • Every second the button isn't pressed the bird goes down the y axis

  • A pipe starts at the right end of the x axis and moves left toward the bird

  • When the pipe reaches the far left corner without touching the bird, you earn a point and the pipe disappears

  • If the bird touches the ground...