How I Built Bird Sort Mania in Unity in 20 Days

Executive Summary
Bird Sort Mania is a commercial color-sorting puzzle game developed in Unity (Universal Render Pipeline) and shipped across Android (Google Play) and WebGL (GamePix browser portal) within a 20-day development timeline on a $6,000 USD project budget.
As the lead Unity engineer responsible for system architecture, gameplay programming, UI implementation, build optimization, and store deployment, my objective was to deliver a complete, maintainable mobile and web title under a fixed 20-day schedule. Rather than treating AI tools (ChatGPT and Claude) as a replacement for game engineering, I used an AI-assisted workflow to accelerate C# boilerplate generation, data-structure scaffolding, and edge-case debugging—reserving manual engineering time for state-machine correctness, input responsiveness, animation timing, and cross-platform build optimization.
Table of Contents
- Project Overview
- Production Constraints
- Unity Technical Architecture
- Core 3D Sorting Gameplay
- Level Design and Progression
- AI-Assisted Development Workflow
- Mobile Performance Engineering
- Monetization and Analytics
- Testing and Deployment
- Technical Challenges and Solutions
- Results and Lessons
- Play the Game
- Discuss a Unity Project
1. Project Overview
| Project Attribute | Verified Record |
|---|---|
| Game Title | Bird Sort Mania |
| Genre | 3D / Stylized Color-Sorting Puzzle |
| Engine & Pipeline | Unity (Universal Render Pipeline / URP, C#) |
| Development Timeline | 20 Calendar Days |
| Recorded Project Budget | $6,000 USD |
| Target Platforms | Android (Google Play Store) & WebGL (GamePix Portal) |
| Role & Responsibilities | End-to-end Unity architecture, C# sorting & level systems, UI layout, animation polish, GA4 telemetry integration, and Android/WebGL release packaging |
| Core Features Delivered | Stack-based branch sorting, multi-bird contiguous transfers, undo history stack, scalable level progression, unlockable backgrounds/themes, and dual mobile/web input |
2. Production Constraints
Shipping a commercial puzzle game across both native mobile and browser WebGL in 20 days introduced three strict engineering constraints:
- Fixed 20-Day Schedule: Every system had to be modular and deterministic from Day 1. There was no schedule buffer for rewriting tightly coupled spaghetti scripts in Week 3.
- Fixed $6,000 Budget: Development had to focus on high-leverage gameplay systems, clean UI states, and reusable level data rather than custom tooling that was not essential to the player experience.
- Dual-Target Delivery (Android + WebGL): The codebase had to compile cleanly to an Android App Bundle (
.aab) for Google Play and a lightweight WebAssembly (.wasm) bundle for mobile and desktop browsers on GamePix—meaning heavy blocking operations or platform-locked dependencies had to be avoided.
3. Unity Technical Architecture
To keep features decoupled during rapid iteration, the project was organized into five independent C# layers:
- Data-Model Separation: Branch occupancy and bird color states are evaluated in pure C# data structures before triggering flight trajectories or branch-bobbing animations.
- Command-Based Undo System: Every valid transfer records a lightweight
MoveRecord(sourceBranchIndex,targetBranchIndex,birdColorId,transferredCount) onto a history stack, allowing players to undo moves reliably without desynchronizing visual transforms. - Dynamic Background & Asset Packaging: Environment themes and UI layouts are decoupled from the core sorting logic so levels can scale without duplicating scenes.
4. Core 3D Sorting Gameplay
In a sorting puzzle game, gameplay feel and state integrity depend on how branches, slots, and in-flight birds are managed:
- Branch and Slot Management: Each branch acts as a bounded Last-In, First-Out (LIFO) stack with a fixed slot capacity (typically 4 slots per branch). Each slot holds a transform anchor where a bird perches.
- Move Validation Rules:
When a player taps a source branch (
Branch A) and then taps a destination branch (Branch B), the move validator checks:Branch Ais not empty and is not already a completed, locked monochromatic branch.Branch Bhas at least one free slot.- Either
Branch Bis completely empty, or the top bird onBranch Bshares the exact sameBirdColorIdas the top bird onBranch A.
- Contiguous Group Transfer:
If the top two or three birds on
Branch Ashare the same color andBranch Bhas enough open slots, the transfer moves as many matching birds as fit in a single action. - Win Condition Detection: After each transfer settles, the controller scans all branches: the level is won when every branch is either completely empty or filled to capacity with birds of a single matching color.
Reference C# Architecture: Branch Stack & Move Validation
Below is a concise representation of the C# branch-stack and move-validation logic used to keep sorting rules deterministic:
5. Level Design and Progression
To keep players engaged beyond the tutorial levels without manually hand-crafting hundreds of Unity scenes, progression was built around a single gameplay scene driven by serialized level data:
- Difficulty Curve Parameters:
- Early Levels (Onboarding): Few bird colors (2–3 species) and generous empty buffer branches so players learn the contiguous-transfer and undo mechanics naturally.
- Mid-to-Late Levels: Increased branch counts (6 to 9+ branches), more distinct bird species, deeper color interleaving at the bottom of stacks, and tighter empty-slot margins requiring multi-step lookahead.
- Solvability & Reverse-Shuffle Generation: Rather than generating purely random bird distributions—which can easily produce mathematically unsolvable deadlocks—levels can be initialized from solved monochromatic branches and reverse-shuffled through valid backward transfers, ensuring a valid solution path exists from the starting state.
- Unlock Systems & Visual Variety: Completing level milestones progresses the player toward unlocking new background themes and visual customizations, persisted locally between sessions.
6. AI-Assisted Development Workflow
A core goal of this project was testing how modern AI coding assistants (ChatGPT and Claude) fit into a disciplined Unity production schedule. AI did not build the game autonomously, nor does AI guarantee faster delivery without strong engineering oversight. Instead, it functioned as an accelerator inside a structured Specify → Generate → Audit → Test → Refine loop.
20-Day Production Breakdown
| Timeline Phase | Primary Engineering Focus | Where AI Assisted | What Required Manual Unity Engineering |
|---|---|---|---|
| Days 1–3: Core Gameplay Prototype | Branch data model, LIFO slot transfers, touch selection, and basic win detection. | Scaffolding initial C# stack classes, undo command structs, and unit-testable move validation methods. | Designing transform hierarchies for branch slots, tuning raycast colliders, and handling mid-flight state locks. |
| Days 4–10: Core Systems & UI Architecture | Level loading pipeline, save/load persistence, HUD Canvas setup, and bird flight transitions. | Drafting JSON/ScriptableObject level serialization helpers and UI state manager boilerplate. | Building responsive CanvasScaler layouts, wiring button events, and synchronizing flight coroutines/tweens with branch animations. |
| Days 11–15: Content & Progression Expansion | Multi-tier level difficulty scaling, theme unlocks, and audio/visual feedback hooks. | Generating level-shuffle parameter tables and helper Editor scripts for batch-validating level definitions. | Playtesting difficulty spikes, balancing branch counts on mobile screens, and verifying asset references. |
| Days 16–18: Polish & Platform Optimization | Visual/sound feedback, WebGL Wasm code stripping, texture compression, and mobile UI polish. | Reviewing C# scripts for per-frame Update() allocations and suggesting collection-reuse patterns. | Tuning flight arc curves, landing anticipation/squash-and-stretch feel, URP quality settings, and Addressables packaging. |
| Days 19–20: QA, Edge Cases & Release Packaging | Rapid-tap stress testing, Android .aab signing, and GamePix WebGL portal integration. | Brainstorming edge-case test checklists (e.g., double-tapping during flight, undoing immediately before win modal). | Reproducing race conditions in the Editor, configuring Google Play signing/listings, and verifying WebGL browser compatibility. |
Limitations of AI-Generated Code in Unity
- Gameplay Feel Cannot Be Prompted: AI can write a
Vector3.Lerpmovement script in seconds, but a linear interpolation feels robotic. Making a bird hop, bank along a paraboloid arc, flare its wings before landing, and trigger a subtle branch bounce required manual curve tuning in the Unity Editor. - Lifecycle and Race-Condition Blind Spots: AI-generated scripts frequently overlook multi-touch race conditions—such as a player tapping a third branch while a bird is still flying between the first two branches, or tapping Undo on the exact frame the win screen triggers. Every generated method had to be audited and guarded with explicit state flags.
- Engine Settings & Serialization: Unity scene wiring,
RectTransformanchor behavior across portrait/landscape ratios, and URP/WebGL build settings must be configured and verified directly in the Unity Editor.
7. Mobile Performance Engineering
Because Bird Sort Mania shipped on both Android and browser WebGL (where players launch the game inside mobile Safari and Android Chrome on GamePix), build size and runtime overhead were engineered carefully. For a full deep dive into these techniques, see our Unity Mobile Game Optimization Guide.
Implemented Optimization Techniques
- Managed C# & WebAssembly Stripping: Configured IL2CPP code stripping and removed unused Unity Package Manager modules so the WebGL loader shell remained compact (sub-15 MB initial WebGL shell configuration on GamePix).
- Texture & Asset Packaging: Used compressed texture formats (including Basis Universal / compressed web textures for WebGL and hardware-compressed mobile textures for Android) alongside two-tier Addressable asset loading for dynamic background themes.
- Event-Driven Gameplay Updates: Because a sorting puzzle only changes state when the player taps a branch or when a bird is actively flying, core game logic is event-driven rather than polling all branches inside a heavy per-frame
Update()loop.
Production Evidence & Performance Record
In accordance with strict engineering transparency, the table below lists only verified repository specifications and explicitly marks unrecorded hardware profiler metrics as Not measured rather than inventing retrospective benchmark numbers:
| Technical / Performance Metric | Recorded Status / Value | Verification Source |
|---|---|---|
| Engine & Render Pipeline | Unity (Universal Render Pipeline / URP) | Verified in project configuration |
| Published Android Package | com.Metalityx.ballPuzzle (Live on Google Play) | Google Play Store Listing |
| Published WebGL Release | Sub-15 MB initial loader shell with Wasm stripping & Addressables | GamePix Live WebGL Release |
| Analytics & Telemetry | Google Analytics 4 (GA4) custom event tracking | Verified in repository portfolio record |
| Average FPS & 95th-Percentile Frame Time | Not measured (raw .data profiler captures not archived in web repo) | — |
| Peak Device RAM Usage (MB) | Not measured | — |
| Per-Frame Draw Call Count | Not measured | — |
| Reference Physical Test Device Model | Not measured | — |
8. Monetization and Analytics
In casual sorting puzzle games, monetization and analytics must support the core loop without interrupting player concentration mid-puzzle:
- Ad Placement Architecture (Rewarded vs. Interstitial):
- Rewarded Video Hooks: High-intent, player-initiated placements—such as unlocking an extra temporary helper branch when stuck, earning additional Undo charges, or claiming bonus coins after clearing a stage—give players clear utility in exchange for watching an ad.
- Natural Transition Boundaries: Forced interstitial ads should never trigger while a player is mid-level; they belong strictly at natural level-complete transitions after onboarding levels and with frequency/cooldown caps. (For full C# implementation details, see our Unity LevelPlay SDK Setup Guide: Interstitial & Banner Ads).
- In-App Purchases (
Remove Ads):- Casual puzzle players frequently convert on a permanent Remove Ads non-consumable upgrade that disables forced interstitials and banners while keeping optional rewarded helper buttons available. (See our Unity IAP 5 Setup Guide: Purchases & Validation for the complete C#
StoreControllerand receipt verification implementation).
- Casual puzzle players frequently convert on a permanent Remove Ads non-consumable upgrade that disables forced interstitials and banners while keeping optional rewarded helper buttons available. (See our Unity IAP 5 Setup Guide: Purchases & Validation for the complete C#
- GA4 Telemetry & Funnel Tracking:
- Bird Sort Mania was instrumented with Google Analytics 4 (GA4) telemetry to log level start, level complete, undo/helper usage, and session progression events—allowing level difficulty bottlenecks to be identified from real player progression data. (Specific commercial revenue, retention, and conversion percentages are not publicly disclosed).
9. Testing and Deployment
Delivering both a native Android build and a browser WebGL build required two parallel release pipelines during Days 19–20:
- Android Release Pipeline (Google Play):
- Compiled via IL2CPP targeting 64-bit ARM (
arm64-v8a), packaged as a signed Android App Bundle (.aab), and published to Google Play under package IDcom.Metalityx.ballPuzzle.
- Compiled via IL2CPP targeting 64-bit ARM (
- WebGL Release Pipeline (GamePix):
- Exported using Unity's WebGL build target with Brotli/Gzip compression, Managed Stripping, and GamePix portal SDK hooks, allowing instant browser play across desktop and mobile web browsers without an app store install.
10. Technical Challenges and Solutions
Below are four concrete engineering challenges encountered during the 20-day build and how each was resolved:
Challenge 1: Multi-Touch Input Desynchronization During Bird Flight
- Problem: When a player rapidly tapped a third branch while a group of birds was still mid-flight between
Branch AandBranch B, the stack count onBranch Bcould be queried before the landing animation finished—causing visual slot overlap. - Engineering Decision: Separate logical stack state updates from visual flight animations, and track per-branch reservation locks.
- Implementation: Updated the logical
BranchStackModelimmediately upon move validation (so subsequent taps see the accurate post-move state) while queuing the visual flight tween on the target slot, locking only the actively animating bird slots until landing completed. - Result: Players could chain moves rapidly and fluidly without waiting for slow animations to finish or corrupting branch slot positions.
Challenge 2: Preventing Unsolvable Level Deadlocks at Scale
- Problem: Naively randomizing bird colors across branches at level start can produce configurations that require more empty buffer slots than exist in the level, frustrating players with impossible boards.
- Engineering Decision: Construct level layouts from guaranteed-solvable states and verify buffer capacity.
- Implementation: Initialized level configurations from completed monochromatic stacks and applied controlled reverse-shuffle steps (or validated color-group permutations against available empty branches), paired with an always-accessible Undo stack and restart button.
- Result: Scalable level progression across dozens of stages without impossible starting boards.
Challenge 3: Translating Raw AI-Generated Scripts into Responsive Gameplay Feel
- Problem: Early AI-generated movement scripts moved birds along straight lines at constant speed and snapped UI panels instantly, making the game feel flat and mechanical.
- Engineering Decision: Replace linear interpolations with custom curved trajectories, staggered multi-bird takeoff delays, and reactive branch animations.
- Implementation: Added parabolic flight arcs (
Mathf.Sinheight offset modulated by anAnimationCurve), a short0.06sstagger between consecutive birds flying in a group transfer, directional sprite/model facing flips, and a damped spring bounce on the target branch upon landing. - Result: Tactile, responsive puzzle interactions that feel rewarding on every tap.
Challenge 4: Keeping the WebGL Build Fast to Load on Mobile Browsers
- Problem: Standard Unity WebGL builds can easily balloon past 30–40 MB if all background textures, audio clips, and unused engine modules are bundled into the initial
.datafile—causing mobile browser tab crashes or high bounce rates before the title screen appears. - Engineering Decision: Strip unused engine code and split dynamic environment assets out of the initial loader shell.
- Implementation: Enabled high managed code stripping for WebAssembly, compressed textures with Basis Universal / web-optimized settings, and used two-tier Addressables asset loading so the initial GamePix shell stayed under 15 MB (see our Unity WebGL Performance Guide for full Wasm & Brotli details).
- Result: Fast initial browser startup across desktop and mobile web browsers on GamePix.
11. Results and Lessons
Confirmed Project Outcomes
- Delivered on Schedule & Budget: Shipped a complete, commercial Unity puzzle game in 20 days within the $6,000 USD budget.
- Multi-Platform Launch: Published live on both Google Play (Android) and GamePix (WebGL browser portal) from a shared Unity C# codebase.
- Reusable Core Systems: Established a clean, modular architecture for stack-based sorting mechanics, command-pattern undo history, data-driven level progression, and GA4 telemetry.
- (Note: Post-launch commercial KPIs such as D1/D7 retention, CPI, and ARPDAU are not published in this technical case study).
Key Engineering Lessons from the 20-Day Build
- AI Accelerates Scaffolding, Not Architecture: AI assistants saved hours on boilerplate serialization, C# data structures, and debugging syntax—but system boundaries, state-machine invariants, and gameplay feel still depended entirely on experienced Unity engineering judgment.
- Separate Logic State From Animation State Early: Decoupling the pure C#
BranchStackModelfrom UnityTransformanimations on Day 2 prevented an entire class of input timing bugs and made implementing the Undo system straightforward. - Design for Dual Mobile + WebGL Constraints From Day 1: Keeping asset sizes, shader complexity, and code stripping clean from the first week made exporting both the Android
.aaband the sub-15 MB GamePix WebGL build smooth in the final two days.
Open-Source Game Scaffolding Tool
To streamline future Unity mobile game setups using the conventions proven during this build (atomic save files, safe-area adaptation, object pooling, consent-gated analytics, and request-file build automation), explore my open-source project bootstrapper:
- GitHub Repository: game-bootstrap → — Open-source Unity mobile scaffolding automation.
12. Play the Game
You can play the live commercial builds of Bird Sort Mania directly on Android or in your browser:
- Google Play Store (Android): Play Bird Sort Mania on Google Play →
- GamePix Portal (Instant WebGL Browser Play): Play Bird Sort Mania in Browser (WebGL) →
Explore More Shipped Unity Titles in My Portfolio
- Restaurant RUSH: Idle Tycoon — App Store | Google Play | WebGL on GamePix
- Pet Hero: Animal Hospital — App Store | Google Play
- Tap the Bat: Reflex Challenge — App Store | Google Play
13. Discuss a Unity Project
If your studio or team is planning a new mobile or WebGL title, explore these related technical guides on architecture, optimization, and monetization:
- Unity Mobile Game Optimization: Unity 6 Performance Guide →
- Unity Addressables Optimization: Memory & Loading Guide →
- GameAnalytics Unity SDK Setup: Events, Funnels & Retention →
- Unity LevelPlay SDK Setup Guide: Interstitial & Banner Ads →
- Unity IAP 5 Setup Guide: In-App Purchases & Receipt Validation →
- Unity Game Development Services | Mobile Game Development Services | WebGL Game Development Services
Get Practical Unity Development Insights
Technical guides on Unity performance, AI gameplay systems, mobile monetization, and game development.
Unsubscribe at any time. Your data is never shared.
Recommended Reading
More articles in Unity Case Study
Unity vs Unreal Engine for Mobile Games: 2026 Comparison
Compare Unity 6 and Unreal Engine 5 for Android and iOS games. Explore development costs, build size, performance, graphics, monetization, and which engine fits your project.
AI Game Development Workflow: How to Build Unity Games Faster in 2026
Discover how AI tools and structured architecture contracts are transforming Unity game development workflows, accelerating early prototyping and production.
Unity Addressables Optimization: Reducing Load Times and Memory Usage
Learn how to optimize Unity Addressables with proper AsyncOperationHandle lifecycle management, reference counting, bundle packing strategies, duplicate dependency analysis, and memory profiling.