Back to Portfolio

Flappy Bird Clone

2D Arcade / Endless RunnerUnity 6000.1.1f1
C#Shader GraphUnity AnimatorSprite RendererObject Pooling

๐Ÿฆ 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!


Medias

Media 1
โ–ถ