One-Button Flyer

A one-button flyer where every level is provably flyable — because the textbook physics formula overstates the climb by exactly one frame of gravity.

Click, tap or press space to flap. Every level is generated inside what the bird can physically reach, so any run you fail was flyable. Everything runs in your browser; nothing is uploaded.

Climbing is linear, falling is quadratic

Between one pipe and the next the bird has a fixed number of seconds to change height, and the two directions are not alike. Tapping every frame holds it at the impulse speed, so the climb grows in proportion to the time. Doing nothing lets gravity accelerate, so the drop grows with the square of it.

So there is a crossover. Below it the bird can rise further than it can drop; above it, falling pulls ahead and keeps pulling ahead. At the standard settings that crossover is 0.428 seconds — and every realistic pipe spacing is past it:

SpacingScroll speedSeconds between pipesCan climbCan drop
180px 140px/s 1.29s 514px 1507px
180px 200px/s 0.90s 360px 743px
240px 140px/s 1.71s 686px 2671px
240px 200px/s 1.20s 480px 1314px
300px 140px/s 2.14s 857px 4165px
300px 200px/s 1.50s 600px 2048px
360px 140px/s 2.57s 1029px 5990px
360px 200px/s 1.80s 720px 2943px

Every row drops further than it climbs, by up to 5.8×. That is the asymmetry a level designer has to live with: a gap can be placed far below the last one and still be reachable, but the same distance above it may simply be out of range.

The textbook formula is not the one this game obeys

The obvious closed forms are impulse × t for the climb and ½ × gravity × t² for the drop. Run them against the actual game loop and the climb one is wrong by a constant 6.98% at every duration — which is the signature of a modelling error rather than a rounding one.

Time between pipesTextbook says it can climbIt actually climbsOut of reach by
0.3s 129px 120px 9px
0.5s 215px 200px 15px
0.8s 344px 320px 24px
1.2s 516px 480px 36px

The cause is the order of two lines. The loop applies the tap and then adds that frame's gravity, so a bird tapping on every single frame rises at impulse − gravity/fps — 400 rather than 430. The shortfall is exactly one frame of gravity, which is why it is the same fraction at every duration.

The forms this game actually obeys are (impulse − gravity/fps) × t for the climb and ½ × gravity × t × (t + 1/fps) for the drop. Checked against the loop across five different gravity, impulse and frame-rate settings, they agree to floating-point precision — worst disagreement 1.5e-12 pixels.

SettingsWorst climb errorWorst drop error
default 1.0e-12px 4.5e-13px
low gravity 5.7e-14px 4.5e-13px
heavy 1.5e-12px 9.1e-13px
120 fps 5.7e-13px 1.1e-13px
30 fps 0.0e+0px 9.1e-13px

This is not pedantry — it decides whether levels are possible. A generator using the textbook climb places gaps up to 36 pixels beyond where the bird can get: levels that look reasonable, pass a glance, and cannot be flown. The generator here uses the discrete forms, and every level it makes was checked to be inside reach before you saw it.

The same correction moves the crossover: the continuous formula puts it at 0.478s, the discrete one at 0.428s — 50 milliseconds apart, and the loop lands on the discrete answer to within a single frame.

How to use

  1. Pick a flight model and a pipe spacing.
  2. Click, tap or press space to flap.
  3. Each flap sets your upward speed; gravity does the rest.
  4. Every gap is placed inside what the bird can physically reach.
  5. Change the spacing to see how far you can climb and drop between pipes.

Frequently asked questions

Is every level actually possible?

Yes, and it is checked rather than assumed. Before a level is shown, every step between consecutive gaps is compared against how far the bird can climb or drop in the time available. Any run you fail was flyable.

Why can I drop further than I can climb?

Because the two are governed by different formulas. Tapping every frame holds you at a constant upward speed, so the climb grows in proportion to the time. Falling accelerates, so the drop grows with the square of it. Past about 0.43 seconds between pipes the drop overtakes the climb and keeps pulling away — at the standard spacing you can fall almost six times further than you can rise.

What is the maximum climb between pipes?

Not impulse times time, which is the formula you would write down first. The game loop applies your flap and then adds that frame of gravity, so even tapping every single frame you rise at impulse minus gravity divided by the frame rate. At the standard settings that is 400 pixels per second rather than 430 — seven per cent short, at every duration.

Does that difference actually matter?

It decides whether levels are possible. A generator using the textbook formula places gaps up to 36 pixels beyond where the bird can reach: levels that look reasonable and cannot be flown. The formulas used here were checked against the game loop across five different gravity, impulse and frame-rate settings and agree to floating-point precision.

What are the exact formulas?

Climb equals impulse minus gravity over frames-per-second, times the time. Drop equals half of gravity, times the time, times the time plus one frame. The second term in each is what the continuous textbook version leaves out, and both come from the order in which the loop updates velocity and position.

Why does the frame rate appear in a physics formula?

Because the game is stepped in discrete frames rather than solved continuously. The continuous formulas are the limit as the frame gets infinitely short; at 60 frames a second the difference is a systematic seven per cent on the climb, not a rounding error. Running the same game at 120 frames a second changes the answer.

Does this send anything anywhere?

No. The game runs entirely in your browser and nothing is uploaded.

🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.