Skip to content

FunplayAI/McpTest-BlockBlast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Block Blast — a commercial-grade mobile game, built end-to-end by AI

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)
home gameplay shop
Live skin recolor Game over (revive / retry)
theme gameover

Run it

  1. Open the project in Unity 6000.3+ (URP);
  2. Open Assets/Scenes/Boot.unity and press PlayGameInit boots every system (claims offline reward → loads the Game scene) → lands on the home screen;
  3. Hit Start and drag blocks to clear rows/columns. You can also open Assets/Scenes/Game.unity directly and press Play (it's self-contained).

Portrait 720×1559. Uses the new Input System; mouse / touch drag-and-drop works.

Architecture

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

Self-tests

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           16

Ep9SelfTest 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.

Honest boundaries

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.

About / tooling

  • 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.

License

MIT © 2026 Funplay

About

A commercial-grade F2P block-puzzle mobile game for Unity, built end-to-end by an AI agent (Claude + Funplay Unity MCP). 150 self-test assertions, AI-generated art, procedurally-synthesized audio.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages