English | 中文
A commercial-quality F2P block-puzzle game for Unity, built end-to-end by Claude + the Funplay Unity MCP — code, scene/prefab assembly, and PlayMode verification all driven by an AI agent. Art is AI-generated (image model + programmatic chroma-key); audio is procedurally synthesized. No hand-written gameplay code, no store-bought assets.
This repository is the output of an experiment: starting from an empty Unity project, build a casual mobile game that looks like a real commercial product using only Claude + the Funplay Unity MCP (plus an image-generation model for art and numpy for audio), and document every step as an article series.
What came out is an endless, score-based block-puzzle game carrying the full "retention + monetization machine" a commercial F2P title needs: a progress-scaled economy curve, an IAP shop, daily streak rewards, idle/offline income, skins, boosters, and a live-ops seam — plus juice everywhere. The core gameplay is only ~5%; the other ~95% is exactly what separates it from a "small-game demo."
| Home | In-game | Shop (scales with progress) |
|---|---|---|
![]() |
![]() |
![]() |
| Live skin recolor | Game over (revive / retry) |
|---|---|
![]() |
![]() |
- Open the project in Unity 6000.3+ (URP);
- Open
Assets/Scenes/Boot.unityand press Play —GameInitboots every system (claims offline reward → loads theGamescene) → lands on the home screen; - Hit Start and drag blocks to clear rows/columns. You can also open
Assets/Scenes/Game.unitydirectly and press Play (it's self-contained).
Portrait 720×1559. Uses the new Input System; mouse / touch drag-and-drop works.
A classic "layered framework → data-driven → event-decoupled" design. Each layer is dissected in one episode of the companion series:
| Layer | Key classes | What it does |
|---|---|---|
| Framework | Property (auto-save) · MsgController (event bus) · Singleton · PoolManager · ResManager |
Save, decoupling, object pooling |
| Boot | GameInit (Boot entry) · GameBootstrap.InitAll (ordered assembly) |
Boot chain; also callable directly from tests |
| Gameplay | BlockGameController · BoardModel · Piece · Scoring |
Place → clear lines → score → dead-end detection |
| Data-driven content | DifficultyConfig (ScriptableObject) |
Difficulty scales with score — tune data, not code |
| Economy | EconomyConfig · CoinModel |
Coins scale with player progress (best score); same-price SKU spans ×118 |
| Shop / IAP | ShopConfigDatabase · ShopController · ShopIapController (#if-guarded real IAP) |
Display price computed live; granting is decoupled from IAP and testable |
| Retention | RetentionController · DailyRewardConfig |
Offline income (8h cap) + daily streak |
| Skins | ThemeConfig · ThemeModel |
Unlock by free / coins / best score; whole board recolors live |
| Presentation | GameView · AudioManager · Easing |
Tweening / combo / ParticleSystem bursts + procedurally-synthesized audio |
| Live-ops | AnalyticsManager · RemoteConfig · LiveOps · AssetService |
Telemetry / remote config / no-deploy events / hot-update seam |
| UI | UIManager · Panels · UIKit |
Runtime uGUI: home / in-game / shop / daily / skins / game-over |
The logic layer is pinned down by in-project self-test classes — no dependency on the Unity Test Framework, they run straight in the editor — 150 assertions, all green:
// Call from the Funplay MCP's execute_code, or any editor entry point:
BlockBlast.Game.Ep2SelfTest.Run(); // core gameplay 13
BlockBlast.Level.Ep3SelfTest.Run(); // data-driven diff. 11
BlockBlast.Shop.Ep4SelfTest.Run(); // economy curve 13
BlockBlast.Shop.Ep5SelfTest.Run(); // shop + IAP 9
BlockBlast.Retention.Ep6SelfTest.Run(); // retention 24
BlockBlast.Presentation.Ep7SelfTest.Run(); // presentation 23
BlockBlast.Ops.Ep8SelfTest.Run(); // data & live-ops 23
BlockBlast.Ep9SelfTest.Run(); // end-to-end 18
BlockBlast.Game.Ep10SelfTest.Run(); // boosters 16Ep9SelfTest runs one end-to-end integration pass (GameBootstrap.InitAll wires every system into a single boot chain), proving these systems together form a coherent game, not a pile of parts.
For a casual genre carried by "geometry + color + game-feel," this pure-AI toolchain can take a game end-to-end to a commercial-grade, playable vertical slice. But a truly shippable product still needs the last mile — backend services, device-level polish, and bespoke music / skeletal animation — which this genre uses sparingly, yet a real launch would require.
- Tool: Funplay Unity MCP — an HTTP MCP server that runs inside the Unity Editor, letting AI clients drive the editor and PlayMode.
- The companion series "Building a Commercial-Grade Mobile Game Entirely with AI" (EP0–EP10) is being published on Zhihu / CSDN (in Chinese), walking through how this project was built piece by piece and verified live through the MCP.
MIT © 2026 Funplay




