Learn Create Your Own Split Screen

Next Page

Flappy Bird is simple enough to control:

When you click the mouse, touch the screen, or press a key the bird is given some upward velocity.

We know how to make things fall and bounce convincingly, but Flappy Bird doesn't do accurate simulation of physics.

Instead, the bird is only affected by gravity until it reaches a maximum fall-speed, then stays falling at that speed.

We're going to set up a few variables to help control how this will work:

var jump_amount = -10; // how much the bird jumps var max_fall_speed= +10; // how fast the bird can fall var acceleration = 1; // how quickly it goes from jumping to falling
Later on we might choose to fiddle with these numbers to make the game either harder or easier to play.