Flappy Bird for Android, only C, under 100KB
Project & implementation details
- Android Flappy Bird clone written entirely in C, no Java source files.
- Uses NDK “native app glue” to create an Activity from C; codebase is under 4k LOC.
- APK is <100 KB, including binaries, images, sounds, manifest, and resources.
- Compiled shared objects are ~37 KB (32-bit) and 48 KB (64-bit); assets ~29 KB.
Code size, binary size, and optimization
- Some find 4k LOC high for such a simple game; others note much of it is Android/PNG glue, not game logic.
- 3rd‑party PNG decoder (upng.c) is ~1,377 LOC; without it, core code is ~2,246 LOC.
- Suggestions for further shrinkage: remove general PNG decoder and generate simple graphics algorithmically or from smaller base sprites.
- Discussion that a “near-perfect” clone on PC or bootsector could be far smaller, but Android platform overhead makes that harder.
Minimalism, game size, and enjoyment
- Several commenters report a strong correlation between small file size and how much they enjoy games.
- Examples range from tiny browser games (~13 KB) to 96 KB FPS demos and 30–40 KB indie games.
- Historical comparisons: early Pac‑Man and Super Mario Bros ROM sizes; tiny Atari and GameBoy Flappy clones.
Android tooling, NDK, and language choices
- Interest in using rawdrawandroid-style approach with other C frameworks like raylib; one commenter shares a partial build script.
- Explanation that “pure C” Android still depends on Java-level Activities and JNI; Java glue is usually simpler to write.
- Requests for an equivalent low-level path for Rust.
Performance & correctness feedback
- Game initially ran too fast on some devices; fixed by capping the loop at 60 FPS.
- Suggested improvement: fixed-timestep techniques to decouple physics from frame rate.
- Question about recreating and uploading GL buffers every frame and its performance impact.
App size, bloat, and app-store dynamics
- Many lament that typical Android (and iOS) apps are orders of magnitude larger, often due to:
- Heavy libraries/support packages automatically added by IDEs.
- Cross-platform runtimes and analytics/ads.
- Large asset bundles (especially graphics, some region/language-specific).
- Desire for app-store filters like “only apps under 10 MB” and “paid, no ads, no IAP.”
- Frustration that very small, high-quality apps get removed for using old SDKs or not being updated; defenders cite security and API evolution.
Flappy Bird’s design & psychology
- Linked paper and discussion suggest Flappy Bird exploits “wanting” vs “liking” dynamics and cognitive biases similar to addiction.
- Observations:
- Difficulty is flat in-game, but personal high scores create self-imposed “summits.”
- Tension and fear near a personal best often cause failure; once surpassed, anxiety moves to the new score.
- Parallels drawn with 70s/80s arcade games and endless runners like Temple Run.