How I Built a Playable Game with AI for About 20 CNY: A Low-Cost Web Game Prototyping Workflow

    This article walks through a hands-on test of using AI to build browser-based mini-games at a fraction of the traditional cost. It covers why web games are ideal for cheap validation, what AI can and cannot deliver today, and a four-stage pipeline: writing a testable spec, generating a prototype with natural language, polishing game feel, and distributing for data-driven validation. Readers will find a structured spec template, a minimal JavaScript example, a feedback checklist, and a breakdown of the costs and common pitfalls. The core takeaway is that AI lowers implementation cost, not judgment cost.

    1. Why Recalculate the Cost of Making a Game

    Traditionally, game development means three things: a professional engine, a professional team, and a long timeline. Even a playable version usually goes through design docs, prototypes, art assets, programming, and testing, with costs measured in person-months.

    Browser-based mini-games offer a lighter path: small in size, no installation, and easy to distribute with a single link once generated. For developers, the real value is not “simple” but pushing validation cost extremely low—whether a gameplay idea holds up can be answered in hours rather than months.

    It is worth stressing that a lightweight prototype is not meant to replace a full commercial release. Its goal is to answer one core question: is this idea fun? Only when that question can be answered quickly does further investment have a basis.

    2. Hands-On Observation: AI Can Match the Look, but Fun Still Needs Humans

    Before starting, I played a batch of AI-generated browser mini-games covering two typical genres.

    The first was shooter games. These usually move an enclosed scene, cover, and a firefight zone into the browser, and can largely reproduce the core thrill of a gunfight: movement, aiming, hit feedback, and resource pickup.

    The second was action fan games. The visuals are often rough, but the skeleton of movement, dodging, and light/heavy attacks is complete; once complex combos and precise hit detection come into play, they clearly fall short.

    This leads to one conclusion: when the gameplay and reference are clearly defined, AI can handle scene asset generation, basic interaction logic, player behavior response, and core mechanic setup fairly well—matching the look is achievable. “Fun” depends on pacing, feedback, and trade-offs, and that part is still defined by the creator.

    Another point matters just as much: the key to a good game is not complexity but being fun in the first place. A story can be driven by dialogue and text alone; combat satisfaction can come from visual effects and scene feedback rather than piling on assets.

    3. Solution Overview: A Four-Stage Low-Cost Development Pipeline

    I broke the practice into four stages, each with a clear deliverable and acceptance criteria.

    1. Idea convergence: turn a vague idea into a testable gameplay description.
    2. Prototype generation: use natural language to drive an AI coding tool to produce a runnable web version.
    3. Feedback polishing: iterate in small steps around “feel” and “readability.”
    4. Distribution and validation: release to a small group of players via a link and collect behavior data.

    The key constraint of this pipeline is that every step must produce something runnable and playable, avoiding staying at the document level.

    4. Step 1: Write the Idea as a “Testable” Spec

    AI output quality depends heavily on input quality. Vague descriptions only yield vague results. A structured template is recommended:

    1. Genre: top-down shooter
    2. Core loop: enter scene -> collect resources -> engage enemies -> extract and settle
    3. Win condition: extract successfully with resources above a threshold
    4. Control mapping: WASD to move, mouse to aim, left click to shoot, Shift to dodge
    5. Feedback requirements: slight screen shake on hit, highlight prompt on pickup
    6. Performance constraints: single scene, no more than 8 enemies on screen at once

    The value of this spec is that it is “testable”: each line can be verified as implemented, and it makes it easy to have AI make targeted changes later.

    5. Step 2: Drive Prototype Generation with Natural Language

    In the prototype stage, it is recommended to have the AI coding tool directly produce a single-file or few-file web implementation for fast iteration. A minimal playable loop looks like this:

    1. const state = { hp: 100, ammo: 30, kills: 0 };
    2. function onHit(target) {
    3. target.hp -= 25;
    4. flashScreen(); // hit feedback
    5. if (target.hp <= 0) {
    6. state.kills += 1;
    7. dropLoot(target.pos); // resource drop
    8. }
    9. }
    10. function tryExtract() {
    11. return state.kills >= 3 ? settle(state) : null;
    12. }

    This code is deliberately minimal: centralized state management, with feedback separated from logic. The prototype stage does not pursue architectural elegance but “change one line and see the effect.”

    The practical lesson is to have AI change only one dimension at a time. Asking for new visuals, changed numbers, and tuned feel all at once often makes problems hard to locate.

    6. Step 3: Polish the “Feel,” Not the Content

    Once the prototype runs, what really determines success is feedback design. An actionable checklist includes:

    • Input response latency: whether feedback from action to screen is immediate, with no obvious lag.
    • Visual readability: whether lighting and materials serve target recognition rather than showing off.
    • Sound and rhythm: whether shooting, hits, and pickups have clear auditory anchors.
    • Difficulty curve: whether the first three minutes give a clear goal and positive feedback.

    Achieving these effects at low cost usually relies on “feedback stacking” rather than asset volume: slight camera shake, hit flashes, and brief floating numbers cost very little but noticeably improve the experience.

    7. Step 4: Distribute and Validate with Data Instead of Subjective Judgment

    After the prototype is done, release it to a small group via a link and watch three signals: where first-time players drop off, the distribution of session length, and the retry rate after failure. A high retry rate means the core loop works; concentrated drop-off at one point means there is a comprehension or difficulty barrier there.

    For validation at scale, you can combine general cloud capabilities: object storage for static assets, a container platform to run services, and logging plus monitoring and alerting to track anomalies and performance metrics. These are common industry categories, so choose based on your team’s existing tech stack.

    8. Cost Structure and Common Pitfalls

    This test brought total spending down to around 20 CNY, mainly from AI coding tool usage and a small amount of asset generation. The premise for keeping costs controllable is a single scene, AI-generated assets, and no cross-platform adaptation.

    There are three common pitfalls: first, pursuing visuals too early and burning the budget on art; second, requesting many changes at once, making problems impossible to locate; third, treating the prototype as a finished product and ignoring retention and onboarding.

    9. Conclusion: AI Lowers Implementation Cost, Not Judgment Cost

    AI makes turning an idea into a playable version cheap, but the core loop, feedback pacing, and trade-off decisions that determine quality remain in the creator’s hands. The practical advice for developers is to first build a playable prototype at the lowest cost, then use real player behavior to decide whether to invest further. This workflow also applies to capability validation inside enterprises—getting a certain conclusion at minimal cost is the real value of low-cost development.