PHPackages                             sugarcraft/honey-flap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. sugarcraft/honey-flap

ActiveProject[CLI &amp; Console](/categories/cli)

sugarcraft/honey-flap
=====================

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

00PHP

Since May 29Pushed 1w agoCompare

[ Source](https://github.com/sugarcraft/honey-flap)[ Packagist](https://packagist.org/packages/sugarcraft/honey-flap)[ RSS](/packages/sugarcraft-honey-flap/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![honey-flap](.assets/icon.png)](.assets/icon.png)

HoneyFlap
=========

[](#honeyflap)

[![CI](https://github.com/detain/sugarcraft/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/detain/sugarcraft/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/632e93e56770c51bbc8f93fa8ca5714b951d7a208c27edd7825ac0cbffe15179/68747470733a2f2f636f6465636f762e696f2f67682f64657461696e2f737567617263726166742f6272616e63682f6d61737465722f67726170682f62616467652e7376673f666c61673d686f6e65792d666c6170)](https://app.codecov.io/gh/detain/sugarcraft?flags%5B0%5D=honey-flap)[![Packagist Version](https://camo.githubusercontent.com/482c55183924f44668c98c2fdd09458b9d78e067dff4f953cf89d9186512304d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737567617263726166742f686f6e65792d666c61703f6c6162656c3d7061636b6167697374)](https://packagist.org/packages/sugarcraft/honey-flap)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP](https://camo.githubusercontent.com/e78ffc83837c0d12647811a7fd1910c3cbeae04988de94bb4fd5b67e0874696a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d3838393262662e737667)](https://www.php.net/)

[![demo](.vhs/play.gif)](.vhs/play.gif)

Flappy-Bird-style game on the SugarCraft stack — port of [`kbrgl/flapioca`](https://github.com/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
------

[](#run-it)

```
composer install
./bin/honey-flap
```

Keys
----

[](#keys)

KeyAction`Space` / `↑` / `w`Flap`r`Restart`q` / `Esc`QuitArchitecture
------------

[](#architecture)

FileRole`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.`PipeGenerator`Generates pipes with variable gap height — gap shrinks as score increases, raising difficulty. Gap starts at 6 cells, shrinks by 1 every 5 points, floors at 3.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.

Difficulty scaling
------------------

[](#difficulty-scaling)

The pipe gap height adapts to the player's score:

Score rangeGap height0–46 cells5–95 cells10–144 cells15+3 cellsGap shrinks by 1 every 5 points, bottoming out at 3 cells to keep the game playable. This is implemented by `PipeGenerator::gapHeightForScore()` and applied automatically when `Game` spawns new pipes via `PipeGenerator::makePipe()`.

Test
----

[](#test)

```
composer install
vendor/bin/phpunit
```

Snapshot tests
--------------

[](#snapshot-tests)

Game frame output is pinned via `candy-testing`'s `assertGoldenAnsi` golden-file snapshots. Any change to the ANSI playfield output must be intentional — re-record the fixture with `--update-golden` to accept a new canonical render.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance64

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1036e0717211b8030b83cbe729e8ba6ba442fdbd5285fb97a39d7dcfe339342?d=identicon)[detain](/maintainers/detain)

---

Top Contributors

[![detain](https://avatars.githubusercontent.com/u/1364504?v=4)](https://github.com/detain "detain (55 commits)")

---

Tags

candycorecomposerphpsugarcraftterminaltui

### Embed Badge

![Health badge](/badges/sugarcraft-honey-flap/health.svg)

```
[![Health](https://phpackages.com/badges/sugarcraft-honey-flap/health.svg)](https://phpackages.com/packages/sugarcraft-honey-flap)
```

###  Alternatives

[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24726.4M22](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

13045.3M6.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

596920.8k12](/packages/php-tui-php-tui)[styleci/cli

The CLI tool for StyleCI

70464.1k9](/packages/styleci-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
