Terminal Flappy Bird clone written in C with ncurses.
- Real-time gameplay loop with gravity/jump physics.
- Config-driven rendering and level tuning.
- Persistent save state and hall-of-fame scores by nickname.
- Persistent global gameplay statistics across runs.
- Dynamic streak-based score multiplier system.
- Configurable terminal sound cues (beep or bell).
- Portable build with dependency tracking (
Makefile).
.
├── assets/ # level files, settings, banners, save/hof data
├── include/flappybird/ # public headers
├── src/ # source implementation
├── .taskfiles/ # modular Taskfile tasks
├── Makefile # build, run, lint, format
└── Taskfile.yaml # task orchestration
- C compiler with C11 support (
gcc/clang) ncursesdevelopment packagemake
make all
./flappy_birdor via Task:
task build:all
task build:runEdit /assets/settings/settings.conf:
- header and border colors
- header dimensions
- FPS
- sound settings (
sound_enabled,sound_mode) - optional gravity defaults
Space: jumpP: pause/resumeE: end runH: in-game quick hintLeft/Right: menu navigationEnter: selectB: exit information pages
Edit constants in /include/flappybird/rendering.h:
MAPSIZEXMAPSIZEY- margins and border width constants
Levels are defined in /assets/levels/level_<n>.conf.
To add a level:
- Copy an existing file (for example
level_3.conf). - Rename it to the next numeric level.
- Adjust speed, gravity, spacing, width and color values.
make all: build binarymake run: build and runmake debug: debug buildmake release: optimized buildmake lint: static analysis viacppcheckmake format: format C files viaclang-formatmake clean: remove artifacts
task setup: install pre-commit hooks and run baseline checkstask ci: clean build + lint checkstask quality:pre-commit: run all pre-commit hooks
Configured in /.pre-commit-config.yaml:
- file hygiene checks (
pre-commit-hooks) - YAML and Markdown linting
clang-formatauto-formatting for.c/.h- build verification on
pre-push
- Runtime save files are:
/assets/saves.conf/assets/hall_of_fame.conf/assets/game_stats.conf
- All are git-ignored through
/assets/.gitignore.