candycore/honey-flap

Flappy-Bird-style game — port of kbrgl/flapioca on the SugarCraft stack.

Maintainers

Package info

github.com/sugarcraft/honey-flap

Homepage

Documentation

Type:project

pkg:composer/candycore/honey-flap

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-05-07 01:29 UTC

This package is not auto-updated.

Last update: 2026-05-07 16:12:33 UTC


README

honey-flap

HoneyFlap

CI codecov Packagist Version License PHP

demo

Flappy-Bird-style game on the SugarCraft stack — port of kbrgl/flapioca. 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.

Run it

composer install
./bin/honey-flap

Keys

Key Action
Space / / w Flap
r Restart
q / Esc Quit

Architecture

File Role
Bird Wraps a HoneyBounce Projectile — gravity pulls it down, flap() resets vertical velocity to a fixed kick.
Pipe Single-column pipe pair with a centred gap. Slides left one cell per tick.
TickMsg Frame-tick message scheduled by Cmd::tick(0.033, …) ≈ 30 fps.
Game (Model) Pure-state world: bird + pipes + score + crashed flag. Injects PRNG closure for deterministic gap placements in tests.
Renderer Pure view — single playfield walk, ANSI-styled glyphs, rounded border.

The PRNG is injected as a Closure(int $maxInclusive): int so unit tests can pin the pipe layout to a specific sequence — the standard SugarCraft pattern.

Test

composer install
vendor/bin/phpunit