← All apps

HoneyFlap

🐝 HoneyFlap

Flappy-Bird in your terminal

port of flapioca game flappy honeybounce physics

Physics-driven flap game — the bird's vertical motion is a HoneyBounce projectile (gravity + an upward velocity kick on each tap), pipes scroll left at a fixed cell rate, collision is per-cell. Pure-state Game class; the renderer is a one-pass canvas fill.

Install

composer require sugarcraft/honey-flap

Quickstart

./bin/honey-flap

// Programmatic:
use SugarCraft\Core\Program;
use SugarCraft\Core\ProgramOptions;
use SugarCraft\Flap\Game;

(new Program(Game::start(),
             new ProgramOptions(useAltScreen: true)))->run();

What's in the box

Real physicsBird movement is a Projectile with gravity vector. flap() rebuilds the projectile with an upward velocity kick — same trick the original flapioca uses, just expressed as projectile state.
Pipe spawningA new pipe pair every PIPE_EVERY ticks; the gap row is sampled from the injected PRNG so tests pin layouts deterministically.
Tick-drivenCmd::tick(0.033, …) ≈ 30 fps. Each tick advances physics + scrolls pipes + checks collision.
Per-cell collisionBird's row is rounded to a cell index; collision = bird column matches a pipe column AND the row is outside the open gap.
Restart on crashr reseeds the world; q / Esc quits.
Score on passEvery tick that moves a pipe past the bird's column bumps the score.
Variable difficultyPipe gap shrinks from 6 cells down to 3 as score increases — every 5 points the gap narrows by 1 cell, making the game progressively harder.

Source & demos

Try the quickstart →

API

ClassMethodDescription
Gamestart()Initialize game state
Gametick(delta)Advance physics one step
Gameflap()Apply upward velocity kick
Gamerender()Return ANSI frame string
Programnew(game, options)Create program
Programrun()Start the event loop
ProgramOptionsnew(useAltScreen)Configure terminal mode

Demos.

VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.

Play

Play

Physics-driven flapping with scrolling pipes.