A modern recreation of the classic arcade mobile game Flappy Bird, built using the Unity game engine. This project demonstrates core game development concepts in Unity, including C# scripting, physics, and UI management.
-
Flap-to-Fly Mechanic
The bird's movement is controlled by a single input (Space key), applying an upward force to aRigidbody2D. -
Procedural Pipe Generation
Pipes are spawned at a regularspawnRateof 2 seconds from a Pipe Spawner object. The vertical position of the gap is randomized between aminYof -1f and amaxYof 3f. -
Dynamic Obstacles
Pipes move continuously from right to left at a fixedmoveSpeedof 5 units per second. Once a pipe moves past a certaindeadZoneof -90, it is automatically destroyed to optimize performance. -
Scoring System
The player's score is tracked by aLogicScript. APipeMiddleScripton each pipe detects when the bird passes through the gap and increases the score by 1. -
Game Over Screen
A Game Over screen is set to inactive by default. When the bird collides with a pipe, thegameOver()function is triggered, activating this screen and ending the game. -
Restart Functionality
A "Play Again" button on the Game Over screen calls therestartGame()method in theLogicScript, reloading the active scene to start a new game.
- Game Engine: Unity
- Language: C#
- Physics: Unity's built-in 2D physics engine (
Rigidbody2D,CircleCollider2D) - Rendering: Universal Render Pipeline (URP)
- Unity Hub
- Unity Editor (LTS version recommended)
- Clone the repository:
git clone https://github.com/Manvith-kumar16/Flappy-Bird.git- Open the project in Unity Editor.
- Open the
Flappy Bird.unityscene file. - Press the Play button in the Unity Editor to run the game.
Contributions are welcome! If you have suggestions or find bugs, feel free to open an issue or submit a pull request.
-
Fork the project
-
Create your feature branch:
git checkout -b feature/AmazingFeature
-
Commit your changes:
git commit -m 'Add some AmazingFeature' -
Push to the branch:
git push origin feature/AmazingFeature
-
Open a Pull Request
- The original creators of Flappy Bird for the inspiration
- Unity documentation and community for guidance and support

