A classic terminal-based implementation of the popular Flappy Bird game in C.
Navigate your bird through an endless stream of obstacles by timing your jumps perfectly. Simple controls, challenging gameplay, and addictive score-chasing await you!
- Simple Controls: Press SPACE to make your bird fly upward
- Dynamic Obstacles: Randomly generated pipe gaps to keep gameplay fresh
- Score Tracking: Your score increases with each obstacle you successfully pass
- Smooth Animation: 130ms frame rate for fluid gameplay
- Game Over Detection: Collide with pipes or boundaries to end your run
- Your bird starts at height 10 on the screen
- Gravity pulls the bird down every frame if you don't flap
- Pressing SPACE lifts the bird up by 1 unit
- Obstacles appear on the right side and scroll left
- The game ends if you hit a pipe or go out of bounds
- Your final score is displayed when the game ends
- GCC or MSVC compiler (C99 or later)
- Windows OS (uses Windows API for
Sleep())
gcc -o flappy_bird main.c./flappy_bird- Language: C
- Platform: Windows (uses
windows.hfor timing) - Map Dimensions: 20 height × 150 length terminal grid
- Bird Start Position: Height 10, Column 40
The game consists of:
- Obstacle generation with random gap placement
- Rendering the map with your bird position
- Input handling (SPACE detection)
- State updates (gravity, scrolling)
- Collision detection
- Repeat or end game
- Timing is Everything: Master the rhythm of flapping to sail through tight gaps
- Track Your Best: Keep playing to beat your high score
- Stay Calm: The faster you react, the better your flow
- High score persistence
- Difficulty levels
- Sound effects
- Better graphics with ANSI colors
- Cross-platform support (Linux/macOS)
Enjoy the game and happy flapping!