๐ฆ Flappy Bird Clone โ Unity Edition
A polished and faithful remake of the original Flappy Bird, built using Unity 6000.1.1f1 as a solo project. Designed to explore Unityโs 2D systems, Shader Graph, C# scripting, and optimization techniques such as object pooling. The game features fluid controls, sprite-based UI, and efficient performance on both desktop and mobile platforms.
๐ฎ Project Type: Solo
๐ Engine: Unity 6000.1.1f1
๐ป Language: C#
๐จ Assets: samuelcust/flappy-bird-assets
๐ฆ Key Systems: Object Pooling, Shader Graph, Sprite-Based UI, Rigidbody2D
๐ฏ Gameplay Overview
Players control a bird that flaps upward each time the player taps or presses space. The goal is to navigate between randomly spaced pipe gaps for as long as possible. Score increases as the player successfully passes through pipes. The game ends when the bird hits a pipe or the ground.
๐งฉ Game Architecture
๐ค Bird Controller
- Handles player input and flapping movement
- Uses physics-based upward force with
Rigidbody2D
- Manages bird rotation and death conditions
๐ง Pipe Spawner
- Spawns pipe pairs at regular time intervals
- Pipes move horizontally across the screen
- Vertical gap positions are randomized for challenge
๐ฎ Game Manager
- Controls game states:
Start
, Playing
, GameOver
- Manages score, high score storage, and restart flow
- Coordinates with UI and audio systems
๐ Background & Floor Movement (Shader-Based)
To simulate forward motion without moving the bird through space, the background and floor sprites are scrolled using a custom Shader Graph:
- UV scrolling is driven by time
- Parallax effect can be achieved by using multiple layers
- Reduces CPU/GPU load by eliminating GameObject translations
- Enhances performance and visual fidelity
๐ Object Pooling System
A generic, reusable Pool Manager was developed to manage:
- Pipe instances during gameplay
- Digit sprite objects used in score display
This pooling system minimizes runtime instantiation, prevents garbage collection spikes, and improves frame stability โ especially during longer sessions or high score streaks. The pooling logic is flexible, allowing for expansion to other objects if needed in the future.
๐ฅ๏ธ UI & Score Display
The UI is entirely sprite-based, mimicking the original game's aesthetic:
- Score is shown using individual digit sprites
- Start screen, Game Over screen, and High Score panels are layered using Unity's Canvas system
- Built-in support for localization-ready layout and sprite swaps
๐ Audio & Visual Feedback
- Sound effects include flap, score increment, and death
- Optional background music loop available
- Visual feedback includes flapping animations and a responsive camera system
- Particle and visual effects used for collision or death states
โ
Features Implemented
- โ
Physics-based flapping movement
- โ
Procedural pipe generation and randomized gaps
- โ
Shader Graph-based background and ground scrolling
- โ
Fully sprite-driven UI and score system
- โ
Object pooling for pipes and score digits
- โ
Game states and reset functionality
- โ
Local high score tracking
- โ
Mobile and keyboard input support
๐งช Playtesting & Feedback
Tested on:
- ๐ฅ๏ธ Desktop (Windows build)
- ๐ฑ Android (test APK)
Feedback Highlights:
- Controls are responsive and tight
- Shader scrolling feels smooth and optimized
- Game resets quickly for minimal downtime between sessions
- Visual style is faithful to the original game
๐ Planned Features
| Feature | Status | Notes |
| ------------------------ | ----------- | --------------------------------------------- |
| ๐ฑ Mobile polish | In Progress | UI scaling and safe area integration |
| ๐ Leaderboard support | Planned | Integration via Google Play or Unity Services |
| ๐ค Unlockable bird skins | Planned | Alternate sprite skins |
| โฑ๏ธ Dynamic difficulty | Planned | Pipe speed and gap size scale over time |
| ๐ Power-ups | Concept | Optional gameplay modifiers |
| ๐ฌ Localization | Concept | Using Unityโs Localization package |
๐ฆ Assets & Licensing
All game assets (sprites, backgrounds, sounds) are used from:
๐จ samuelcust/flappy-bird-assets
๐ Licensed under the MIT License
Includes:
- Bird sprites (multiple colors)
- Pipes, base, background images
- Score digits and banners
- Sound effects from original Flappy Bird
๐ง What I Learned
- Building reusable and optimized gameplay systems in Unity
- Using Shader Graph for background scrolling and performance improvements
- Designing a generic object pooling system for scalable reusability
- Working with sprite-based UI systems instead of traditional text
- Managing 2D game physics and collision systems
- Creating clean project structure and modular scripts for future expansion
๐ง Build Targets
- ๐ฅ๏ธ Windows (.exe) โ complete
- ๐ฑ Android (.apk) โ complete
๐ฌ Contact & Next Steps
This game was built as a self-directed learning project and portfolio piece. I'm eager to apply these skills to more complex games and collaborate with other developers or mentors.
๐ I'm constantly learning and enjoy solving game development problems. If you're building something exciting or want to collaborate, Iโd love to connect!