STAGE 2-3
PROTOTYPE

Flappy Bird

Role Gameplay Programmer
Timeline 2025
Platform Unity 2D (URP) · PC
Team Size 1 (Solo)
UnityC#Rigidbody2DObject PoolingNew Input System
STAGE 2-3 // GAMEPLAY FLAPPY BIRD Unity C# Rigidbody2D Object Pooling New Input System SYSTEM_INIT: OK | MEMORY: ALLOCATED | RENDERING: ONLINE

Mission Brief

Build a tight, zero-garbage-collection 2D Flappy Bird mechanics loop in Unity using Rigidbody2D physics and fixed-array obstacle recycling, serving both as a standalone arcade game and as the foundation for the ML-Agents PPO project.

Key Systems Engineered

Zero-Allocation Circular Pipe Pool (PipesManager.cs)

Allocates exactly 10 pipe-pair instances once in Awake(). As pipes scroll at a constant horizontal speed (-6.0f) past -initialXPos, the manager shifts the leading pipe index (firstInLine wrapped via modulo) to the back of the line with a fresh randomized gap height — zero Instantiate() or Destroy() calls during gameplay.

Physics-Driven Flight Controller (PlayerMovement.cs)

Applies vertical impulse directly via rb.linearVelocityY = jumpForce on New Input System callbacks while relying on Unity's Rigidbody2D gravity simulation for natural parabolic arcs.

Modulo Index-Pointer Scoring & Event Decoupling

Tracks the next upcoming pipe via a wrapping nextScoringPipe pointer (% numberOfPipes) and fires OnScoreIncrease as it crosses X = 0, decoupling UI and audio listeners from obstacle movement.

Implementation Details

Architecture & Deep Dive

Flappy Bird implements a zero-allocation gameplay loop where all 10 pipe pairs are pre-instantiated and recycled via a circular index pointer. The pipe speed is a fixed constant (-6.0f) — there is no runtime difficulty scaling.

The scoring system uses a modulo-wrapped pointer to track which pipe is next to be scored, firing an event when the player crosses X = 0. This cleanly decouples scoring from both movement and rendering.

Select Player Class

Your class determines which skills and projects are highlighted throughout the site.

Achievements (0/11)

Press Start
Skipped or clicked through the boot sequence.
Class Act
Selected a Player Class to customize project ordering.
Efficient
Opened the 60-second Recruiter Mode summary.
Level Up
Opened your first engineering project Case File.
Completionist
Cleared all 12 project Case Files.
Coin Collector
Found and collected all 7 hidden coins across the site.
Old School
Entered the Konami Code or activated Arcade Mode.
Snake Charmer
Scored 10 or more points in the 404 Game Over Snake mini-game.
Hello, World
Copied the contact email address to your clipboard.
Curious
Opened the Keyboard Controls (?) overlay.
Bonus Round
Entered the hidden Bonus Stage development lab.

System Settings

Theme
Motion
Audio
Sound Effects
Advanced
Keyboard Shortcuts
Show Hidden Coins
Arcade Mode (CRT)

Keyboard Shortcuts

Navigate Sections
1 2 3 4
Open Achievements
A
Open Settings
S
Toggle Audio
M
Close Modal
Esc
Konami Code
↑ ↑ ↓ ↓ ← → ← → B A