🐤 FLAPPY

One button. Gravity. And a great many pipes

← Back to Fun Time
Score
0
Level
1
Pipes
1
Best
0

⌨️ Controls

  • SPACE, or W flap
  • Clicking or tapping the sky flaps too
  • P pause  •  R new game
  • Your first flap starts the game — no need to press start.
  • 🎮 Xbox controller? Just plug it in or pair it — the stick and D-pad are the arrow keys, A is SPACE, Menu pauses and View starts again

🎯 How to play

  • The bird falls all by itself. Flapping is the only thing you control.
  • Fly through the gap in each pipe.
  • Touching a pipe, the ground or the ceiling ends the run.
  • Short taps beat long ones — flap little and often.

🏆 Scoring

  • One point per pipe you get through.
  • Every 5 pipes the game speeds up a little, all the way to level 15.
  • Ten pipes is a good run. Twenty is showing off.
  • Tip: aim for the middle of the gap, not the bottom of it.

🧑‍💻 For young coders: build this game yourself

This game is split into small library files inside funtime/lib/, and every function has a comment saying exactly what goes in, what comes out, and the algorithm in plain English. Empty any function out, read its comment, and write it yourself.

File What it does Good functions to try re-writing
lib/flappy-rules.js The rules: gravity, pipes, crashes applyGravity, flap, movePipes, isCrashed
lib/flappy-draw.js Painting the sky, the pipes and the bird drawPipe, drawBird, renderGame
lib/flappy-main.js The glue: the keyboard, the taps, the loop doAction, connectBoard, gameLoop

💡 The big idea: gravity changes speed, not position. Add a little to dy every frame, then move by dy. That one pattern is behind every jump, every falling rock and every bouncing ball you have ever played with.

🛠️ Want to be walked through it? Build Flappy Yourself takes you through the key functions one step at a time and tests each one you write. There is a Python version too.