A modern Flappy Bird clone built with Rust and the Bevy game engine. Smooth physics, pixel-perfect collisions, and a growing feature set.
This project is a fork of Biped-Potato/flappy_bird, a Flappy Bird clone written entirely in Rust using the Bevy game engine.
The goal of this fork is to take the base implementation and push it further — improving gameplay feel, adding missing features (scoring, audio, menus), and using it as a learning playground for Bevy's ECS architecture.
- 🐦 Bird with gravity and flap physics
- 🟩 Procedurally spawned pipes
- 💥 Collision detection
- 🔄 Game reset on death
| Feature | Status | Description |
|---|---|---|
| 🏆 Score system | implemented |
Real-time score counter + high score persistence in save.ron |
| 🎬 Game states & Menus | implemented |
Start screen, playing, and game over states |
| 🎵 Sound effects | planned |
Flap, score, death and background music via bevy_audio |
| 📈 Difficulty scaling | planned |
Increasing pipe speed and gap reduction over time |
| ✨ Visual polish | planned |
Sprite animations, parallax background, particle effects |
| 🌐 WASM build | planned |
Playable in the browser via WebAssembly |
- Rust (latest stable — Bevy tracks close to the latest MSRV)
cargo(bundled with Rust)
# Clone the repo
git clone https://github.com/<your-username>/flappy_bird.git
cd flappy_bird
# Run in development mode
cargo run
# Run with optimizations (recommended for smooth gameplay)
cargo run --releaseTip: Add the following to
.cargo/config.tomlfor faster compile times in development:[profile.dev] opt-level = 1 [profile.dev.package."*"] opt-level = 3
| Input | Action |
|---|---|
Space / Left Click |
Flap |
R |
Restart (after death) |
Esc |
Quit |
The project follows Bevy's Entity Component System (ECS) pattern:
src/
├── main.rs # App entry point, plugin registration
├── core/
│ ├── mod.rs # CorePlugin, state machine initialization
│ ├── config.rs # GameConfig parsing from .ron files
│ ├── state.rs # GameState enum (MainMenu, Playing, GameOver)
│ └── save.rs # Data persistence (High Score saving via Serde)
├── game/
│ ├── mod.rs # GamePlugin, setup and cleanup logic
│ ├── player.rs # Bird logic, physics, jumping
│ ├── environment.rs # Pipe spawning, scrolling, scoring
│ └── collision.rs # Decoupled collision detection
├── ui/
│ └── mod.rs # UiPlugin, Main Menu, Game Over screen, HUD
└── hardware/ # (planned) Embedded systems integration
Each game system is a Bevy plugin, keeping responsibilities isolated and the codebase modular.
| Language | Rust |
| Game Engine | Bevy |
| Architecture | ECS (Entity Component System) |
| Rendering | wgpu (Vulkan / Metal / DX12 / WebGPU) |
| Audio (planned) | bevy_audio |
- Original implementation by Biped-Potato
- Built on top of the Bevy game engine — free and open source forever
This project is licensed under the MIT License — see the LICENSE file for details.