AI Game Development Cost Breakdown: How I Built a Playable Prototype for About 20 CNY

    This article documents a hands-on test of building a browser-based game prototype with AI-generated assets, where the total cost came down to roughly 20 CNY. It explains why the web is the ideal minimum viable platform, breaks the cost model into inference, asset generation, and hosting, and walks through a five-step workflow: writing a verifiable spec, layered generation, procedural assets, performance budgets, and automated validation with gradual rollout. It also covers common pitfalls and argues that AI changes the cost curve rather than design judgment.

    1. Background: The Barrier to Game Development Has Been Redefined

    Game development used to mean professional engines, full teams, timelines measured in years, and budgets starting in six figures. But a notable pattern has emerged over the past two years: pseudo-3A-quality work with complete lighting, materials, and sound effects can run directly in a browser, with every asset generated from scratch by AI, at a total cost compressed to a few hundred CNY. Broken down further, a playable prototype can be up and running for under 20 CNY.

    The value of these cases is not that “AI replaces producers.” It is that AI compresses the most expensive link in the development pipeline: the distance from an idea to a playable prototype. This article uses a personal test as its main thread and abstracts the entire process into a reusable engineering method.

    One boundary needs to be clear first: AI is currently good at “surface resemblance”—recreating scene assets, basic interactions, character actions, and core mechanics when the gameplay and reference are well defined. It is not good at “spirit resemblance”—the parts that depend on feel tuning, pacing design, and emotional curves. Some browser-based fan games mentioned in the original text have movement, dodging, and light and heavy attacks, but complex moves and combos are out of reach, for exactly this reason.

    2. Why the Web Is the Minimum Viable Platform

    Before starting, the choice of platform determines the cost structure. The web form has three engineering advantages:

    • Zero installation, zero distribution friction: The output is a link. Anyone can click and play, shrinking the feedback loop from “build, review, download” to seconds.
    • A converged tech stack: A minimal combination of HTML, CSS, and graphics rendering interfaces is enough to handle 2D and lightweight 3D scenes, with no need for a massive engine runtime.
    • Iteration is deployment: Static assets can be hosted directly on object storage, and combined with a content delivery network, publishing is just a file upload.

    The trade-offs are equally clear: constrained by the browser sandbox and the main thread, heavy physics simulation, large numbers of on-screen entities, and high-precision real-time lighting are all unrealistic. So the web is suited to validating “whether the gameplay works,” not to delivering “top-tier visual fidelity.” This matches the original judgment: the most important thing about a good game is not complexity, but whether it is fun.

    3. Cost Model: Where the 20 CNY Goes

    Break the cost down and it is not magic—it is the sum of three categories of spending.

    Cost Item Description Control Method
    Inference calls Prompt consumption for generating code, textures, and sound effects Generate in stages, text first then assets; cache and reuse
    Asset generation Sampling overhead for textures, models, and audio Start at low resolution; use procedural textures instead
    Hosting and traffic Static asset storage and distribution Asset compression, on-demand loading

    What truly drives the bill is not unit price but the number of reworks. A full generation launched without clear thinking can multiply the cost tenfold. So the first principle of cost control is to eliminate uncertainty at the prompt stage, not at the generation stage.

    4. Implementation Path: Five Steps to a Playable Prototype

    Step 1: Write the idea into a verifiable spec

    Do not write “make a fun shooter.” Write down the core loop, input mapping, win and loss conditions, and single-match duration. The more specific the spec, the higher the usability rate of the generated result. An executable template looks like this:

    1. Genre: top-down shooter, 90 seconds per match
    2. Input: WASD to move, mouse to aim, left click to shoot, space to dodge
    3. Core loop: collect supplies → engage patrol units → reach the extraction point
    4. Win/Loss: HP reaching zero is a loss; entering the extraction zone and surviving 3 seconds is a win
    5. Constraints: no more than 40 on-screen entities, no external assets

    Step 2: Generate in layers, skeleton before flesh

    Asking for a complete game in one shot usually yields structurally messy code. A more reliable approach is layering:

    1. Generate the scene and camera, and confirm the rendering pipeline works;
    2. Generate the character controller and collision, and confirm a baseline feel;
    3. Generate the enemy behavior tree and weapon logic;
    4. Finally add sound effects, particles, and UI.

    Get each layer running before moving to the next, and rework cost grows linearly rather than exponentially.

    Step 3: Procedural substitution for assets

    Textures and models are the big cost drivers. A workable strategy is to prioritize procedural generation: use noise functions to produce ground and metal textures, assemble containers and pipes from basic geometry, and synthesize gunshots and footsteps with parametric audio. This both lowers cost and keeps asset size under control.

    Step 4: Establish a performance budget

    Set the budget before writing the first line of gameplay code—for example, first-screen assets no more than 3MB, main-thread time per frame no more than 12 milliseconds, and draw calls no more than 100. The budget is a hard constraint: if it is exceeded, optimize first before developing new features.

    Step 5: Automated validation and gradual rollout

    The prototype stage lacks the most test manpower. Use scripts to drive a headless browser through fixed input sequences and assert key states:

    1. // Illustration: scripted regression to verify the core loop closes
    2. const run = await browser.newPage();
    3. await run.goto(GAME_URL);
    4. await run.keyboard.press('KeyW');
    5. await run.waitForTimeout(1500);
    6. const state = await run.evaluate(() => window.__debug.snapshot());
    7. assert(state.playerMoved, 'Character did not respond to movement input');
    8. assert(state.enemyCount <= 40, 'Entity count exceeds budget');

    Roll out gradually: distribute the link to a small group first to collect feedback, then scale up. Static hosting combined with logging services and monitoring alerts allows a quick rollback to the previous version when the error rate rises.

    5. Common Pitfalls and How to Avoid Them

    • Vague prompts: The generated result looks complete but cannot run. The fix is to write the spec first, then the prompt.
    • Chasing visual fidelity too early: Burning the budget on lighting before gameplay is validated. The fix is to prove “fun” first, then talk about “good-looking.”
    • Ignoring state management: Piling up global variables in the prototype stage makes later expansion impossible. The fix is to use a clear state machine division from the start.
    • Developing without a budget: Performance problems only surface before launch. The fix is budget first, regression every round.

    6. Conclusion: AI Changes the Cost Curve, Not Aesthetic Judgment

    The real conclusion of this test is not that “producers will be laid off,” but that the shape of the development cost curve has changed: from “high fixed cost, long cycle” to “low marginal cost, fast feedback.” Idea validation has shrunk from weeks to hours, and trial and error has become cheap.

    But cheap trial and error amplifies one consequence: output volume surges while the ability to filter stays the same. So the core competitiveness of developers shifts from “can it be built” to “can you judge what is worth building.” Whether the gameplay works, whether the feel is comfortable, and whether the pacing grabs players—these judgments still depend on human experience and aesthetics.

    For teams, the pragmatic way to land this is to place AI in specific stages of the pipeline: spec writing, code skeleton generation, procedural assets, and scripted testing, while keeping design decisions in human hands. If you need to handle higher concurrency and more stable distribution, you can use a container platform for the build pipeline, object storage to host static assets, a content delivery network for acceleration, and a logging and monitoring system for observability. Baidu AI Cloud offers corresponding categories for these general capabilities, which can be combined as needed.

    The 20 CNY test shows that the barrier is no longer the problem. The next question is whether you have a clear enough judgment to decide which gameplay that 20 CNY should be spent on.