Speedy Bird
Flappy Bird where every pipe you clear makes the game 1% faster.
Press Space or Enter while the game has focus, or click or tap it, to flap. Fly through the gaps. Each pipe scores a point and makes the game 1% faster.
Tap or click the game, or press Space while it has focus.
No runs yetLoading
- Pipes cleared
- 0
- Speed
- 1.00×
- Scroll
- 2.70px/step
- Next pipe every
- 77steps
- Next medal
- Bronze in 10
- Best
- 0
The game is the ReactLynx app itself, main.web.bundle in a <lynx-view>. It reports these values through SpeedyBirdModule.
Sheet 1 · Speed by score
The speed curve
Speed is 1 + score ÷ 100: each point adds 1% to how fast the pipes and ground scroll. Pipes also spawn closer together until score 276, where the gap between them stops shrinking at 20 steps.
| Score | Speed | Scroll | Pipe every | Medal |
|---|---|---|---|---|
| 0 | 1.00× | 2.70px | 77 steps · 1.28 s | Start |
| 10 | 1.10× | 2.97px | 70 steps · 1.17 s | |
| 25 | 1.25× | 3.38px | 62 steps · 1.03 s | |
| 50 | 1.50× | 4.05px | 51 steps · 0.85 s | |
| 100 | 2.00× | 5.40px | 39 steps · 0.65 s | |
| 200 | 3.00× | 8.10px | 26 steps · 0.43 s | |
| 276 | 3.76× | 10.15px | 20 steps · 0.33 s | Pipes stop getting closer |
engine.ts when this page was built.Sheet 2 · One bundle, three hosts
The same game on Android, iOS, and the Web
bun run build produces one Lynx bundle. Each host is a thin native shell that loads it and answers the same five calls through a native module named SpeedyBirdModule: sound, the saved best score, and screen-reader announcements.
| Call | Android | iOS | Web |
|---|---|---|---|
play(sound) | SoundPool | AVAudioPlayer | Web Audio |
stopAudio() | SoundPool.autoPause | AVAudioPlayer.stop | stop every source |
loadPreferences(callback) | SharedPreferences | UserDefaults | localStorage |
savePreferences(json) | SharedPreferences | UserDefaults | localStorage |
announce(message) | Live region | VoiceOver announcement | aria-live region |
The build checks each host's source for these methods, so this table fails the build if it goes out of date.
Sheet 3 · What runs where
The frame loop runs on Lynx's main thread
Lynx has two threads: a main thread that owns the screen and a background thread for app logic. Taps, the simulation, and every per-frame style change stay on the main thread, so a flap shows up in the next frame. React on the background thread only redraws the score and overlays when they change.
- Steps. Elapsed time becomes fixed 1/60 s steps, so speed never depends on the display's refresh rate.
- Render.
render()writes transforms withsetStyleProperties; React is not involved. - Publish.
publish()crosses to the background thread only when the score, state, or sounds change.
src/hooks/useGame.ts, line 189const frame = () => {
handle = 0;
if (paused) return;
const now = Date.now();
const elapsed = now - lastTime;
lastTime = now;
if (game.gameState === STATE_PLAY && elapsed >= STALL_PAUSE_MS) {
paused = true;
publish([]);
return;
}
const steps = consumeElapsed(clock, elapsed);
const sounds: SoundName[] = [];
for (let index = 0; index < steps; index++) {
const transition = step(game);
game = transition.state;
sounds.push(...transition.sounds);
}
render();
publish(sounds);
// Stop the loop once nothing can change until the next tap.
if (!isIdle(game)) handle = requestFrame(frame);
};Manual
Read how it is built
1 Overview
- 1.1 About Lynx
ReactLynx concepts used by Speedy Bird: native rendering, built-in elements, CSS, threads, and native modules.
- 1.2 Architecture
Project layout, component tree, what runs on each Lynx thread, the test suite, and the web surfaces.
- 1.1 About Lynx
2 Engine
- 2.1 Game engine
The pure rules engine, main-thread frame loop, physics, collisions, scoring, restart lock, and host bridge.
- 2.2 Assets and sprites
Sprites embedded in the bundle, tile-based pipes, the sound files, keeping the website copies in sync, and credits.
- 2.1 Game engine
3 Deploy
- 3.1 Getting started
Install dependencies and run the ReactLynx app, web hosts, documentation site, and native hosts.
- 3.2 Native host apps
Build and test the Kotlin Android and Swift iOS hosts: native bridge, lifecycle, UI tests, and signing.
- 3.3 CI/CD pipeline
Build checks, iOS UI tests, Android build releases, unsigned iOS archives, and immutable versioned releases.
- 3.1 Getting started
4 Maintenance
- 4.1 Dependencies and upgrades
Verified dependency versions, native toolchain requirements, compatibility holds, and the upgrade verification process.
- 4.1 Dependencies and upgrades