← back to Flappy Sky

README.md

38 lines

# Flappy Sky

A polished, **single-file, zero-dependency** Flappy-Bird-style game. Pure HTML5
Canvas 2D + WebAudio — no libraries, no external assets. Open `index.html` in any
modern browser and play.

## Controls
- **Flap** — Space / ↑ / Enter / Click / Tap
- **Pause** — `P` (also auto-pauses when the tab loses focus)
- **Mute** — `M` (or the 🔊 button)

## Features
- Fixed-timestep physics (120 Hz) → identical feel at any refresh rate
- Increasing difficulty (gap shrinks, pipes speed up & spawn faster up to score 25)
- Parallax background: twinkling stars, two scrolling hill layers, drifting haze
- Scrolling textured ground; soft ceiling (clamp, not instant death — classic feel)
- Accurate circle-vs-rectangle collision
- Death feedback: screen shake, red flash, particle burst, hit-stop
- Medals on game over (🍃 / 🥉 / 🥈 / 🥇 / 💎) + persistent best score
- Procedural WebAudio SFX (flap / score / hit) — no audio files
- Responsive + DPR-aware canvas, mobile-friendly, safe-area insets
- Respects `prefers-reduced-motion`

## Provenance
Built from GPT-5.1's Model Arena "All-Models — Flappy Clone" artifact. Fixes over
the original:
- Idle bird bob no longer accumulates positional drift (oscillates around a fixed base)
- No double-flap on touch (unified Pointer Events + debounce)
- Auto-pause on tab blur / visibility change
- Soft ceiling instead of unfair instant top-edge death
- Added ground plane, audio, medals, pause, screen shake, reduced-motion support
- Frame-rate-independent fixed-step physics

Mirrored into the Agent Abrams Arcade (`games-agentabrams`) as `flappy-clone`.

## Test
Headless Playwright play-through in `test/e2e.mjs`.