Building Games With AI: How I Cut Development Costs to About 20 CNY
This article documents a hands-on test of using AI coding tools to build a browser game prototype for roughly 20 CNY in direct cash spending. It explains why web mini-games are a practical validation target, where generative tools perform well and where human input is still required, and how to structure prompts and iterate from an idea to a playable build. It also breaks down the cost strategy, key engineering practices, and the main takeaway: the real barrier is defining the problem well, not mastering an engine.
1. Test Background: Why Start With a Browser Mini-Game
Before asking whether AI can build games, it helps to define what is being validated. Compared with heavyweight projects that require specialized engines, team coordination, and long resource cycles, browser mini-games have three natural advantages: no installation, low distribution cost, and short feedback loops. A single link lets anyone try the game, which makes it well suited to validating the upfront question of whether a concept holds up.
The goal of this test was not to clone a commercial title, but to validate a general path: describe the gameplay in natural language, have an AI coding tool generate a runnable browser prototype, and then make a few manual adjustments to reach a playable version. Direct cash spending was about 20 CNY, mainly for a minimum top-up of cloud resources and API calls. If time cost is factored in, most of the effort went into prompt design and validation.
One important point: low cost depends on a controlled scope. The prototype implemented only one core loop, such as “move, encounter, engage, extract,” without full levels, complex narrative, or multi-platform support.
2. Capability Boundaries: What AI Does Well and What It Does Not
One conclusion came up repeatedly during testing: when the reference and gameplay goals are clear enough, generative tools handle the “looks right” parts well, including basic scene setup, placeholder assets, input handling, state transitions, and simple rule checks.
However, human involvement is still needed in these areas:
- Game feel tuning: movement acceleration, recoil curves, and the subtle timing of hit feedback;
- System coupling: balancing saves, economy, drops, and quests;
- Complex actions: multi-stage combos, precise collision shapes, and animation state machines;
- Performance constraints: rendering and logic overhead with large numbers of entities.
So the sensible strategy is to treat AI as a prototype accelerator, not a replacement for a full team. What makes a game good is not complexity but whether the core experience works. That may come from the pull of narrative text, or from the combat satisfaction created by lighting effects and scene feedback.
3. Development Workflow: From Prompts to a Playable Prototype
1. Structure the Requirements
Start with a structured description that fixes the boundaries: perspective, controls, win and loss conditions, scene style, and performance targets. Example:
Type: top-down shooter prototypeControls: WASD to move, mouse to aim, left click to shoot, R to reloadLoop: enter area -> encounter fixed-spawn enemies -> extraction point opens after clearingConstraints: single scene, no more than 40 entities, target frame rate 60
2. Layered Prompts
Split prompts into three layers: skeleton, interaction, and presentation. Generate them layer by layer instead of requesting everything at once:
- Skeleton: canvas initialization, main loop, entity management;
- Interaction: input mapping, collision detection, hit detection;
- Presentation: placeholder textures, placeholder particles and sound effects, UI states.
3. Placeholders and Replacement
During the prototype stage, use geometric shapes and synthesized audio as placeholders, and replace them with production assets only after the core loop works. This significantly reduces the chance of generation failures and rework.
4. Iterative Validation
Change only one variable per round, such as enemy spawn density or bullet speed, and playtest immediately. Keep rollback-able version copies so you can compare differences in game feel.
4. Cost Control: Where the 20 CNY Went
Low cost is not magic. It comes from scope and resource strategy working together:
- Scope: a single scene and a single loop, avoiding multiple levels and systems;
- Asset strategy: prioritize procedural generation and placeholder assets to reduce external purchases;
- Resource usage: call cloud compute and storage on demand only when needed, and release them promptly once the prototype is done;
- Failure budget: reserve retry allowance for generation failures to avoid interruptions from a single overrun.
If a formal release is needed later, you can bring in object storage for static assets, a content delivery network to reduce latency, and logging and monitoring with alerts to locate production issues. These are general cloud capability categories that can be combined as needed, so there is no need to invest in them during the prototype stage.
5. Engineering Essentials: Making the Prototype Actually Playable
- Performance: control entity count, reuse object pools, and avoid frequent creation and destruction inside the main loop;
- Saves: the prototype can use local storage for minimal progress, with a later migration to the server for the production version;
- Input compatibility: handle both keyboard and mouse and touch input so the game is not completely unusable on mobile;
- Observability: add instrumentation at key points to record frame rate, failure reasons, and where players drop off;
- Release: static hosting is enough to go live, with version numbers to manage canary releases and rollbacks.
6. Conclusion
This test shows that with AI coding tools, an individual or a small team can validate the core gameplay of a browser mini-game at very low cash cost. The real barrier has shifted from “knowing how to write an engine” to “being able to define the problem well”: break gameplay into small, verifiable loops, use layered prompts to constrain the generation scope, and then refine game feel through strict iteration. That way, an idea can reach players quickly in the form of a link.
