Building Games With AI: How I Cut Prototyping Costs to About 20 CNY
This article walks through building a browser-based shooter prototype with AI coding tools and shows how generative AI changes the cost structure of game development. It explains why web prototypes are the cheapest way to validate gameplay, what AI handles reliably (scene assembly, basic interaction loops, rule skeletons) and where it falls short (game feel, complex combos, performance control), and a reusable four-step method for keeping costs near 20 CNY: one-sentence gameplay specs, layered generation, externalized parameters, and decoupling assets from logic. It also covers four quality gates every AI-generated build must pass before it can be considered usable.
1. Starting Point: A Browser-Based “Search, Fight, Extract” Prototype
When you open a shooter prototype in a browser, the first reaction is often that it must be a cloud-rendered stream. The lighting layers, material grain, and recoil feedback all look complete. In reality, this kind of prototype can be generated continuously for hours without human intervention by an AI coding tool from a short natural-language description. The models, audio, and textures are all synthesized from scratch by algorithms, and the total cost comes out to only a few hundred CNY.
The value of this case is not about “replacing someone.” It validates one thing: when the gameplay reference is clear enough, generative technology can already achieve a close visual and structural match. Scene assets, basic interactions, character movement, and rule checks are all areas where AI delivers high completion. But once you move into complex combos, fine-tuning game feel, or long-term content operations, the capability limits show up immediately.
2. Why Start With a Web Prototype: The Cost Structure Decides the Order
The traditional development path has to solve engine selection, project scaffolding, asset pipelines, and multi-platform adaptation first, with team and timeline forming the main costs. The web format compresses this chain: no installation, distribution by link, iteration by refresh. What is genuinely developer-friendly is that the upfront cost of the technical barrier is greatly flattened, and the validation cycle for creative ideas and gameplay drops from weeks to hours.
A practical decision rule:
- Does the gameplay hypothesis hold? Validate it with a web prototype at very low cost.
- Do the feel and numbers hold? This requires multiple rounds of tuning, and AI can only provide a usable first draft.
- Long-term content and economy systems? These must be designed by humans; AI is not good at them.
3. Capability Boundaries: What AI Is Good At and What It Is Not
Comparing several generated prototypes of the same type (classic cargo-ship-style gunfights, action-style fan levels), the pattern is clear.
Parts where AI is relatively reliable:
- Scene building and atmosphere: containers, pipes, cover, lighting mood;
- Basic interaction loops: movement, aiming, firing, dodging, light and heavy attack branching;
- Rule skeletons: hit detection, health, win/loss conditions, simple wave spawning.
Parts where AI clearly falls short:
- Game feel details: acceleration curves, input buffering, animation blending and interruption;
- Complex combos and state machine depth;
- Performance and memory controllability, especially with many entities on screen at once.
4. Pushing Costs Down to 20 CNY: A Reusable Four-Step Method
The key to extremely low cost is not “letting AI do everything in one shot,” but splitting + small-step validation + reuse.
Step 1: Reduce gameplay to one sentence. Compress the idea into a single testable statement: “Top-down view, cover shooting, random extraction point, fail after being hit three times.”
Step 2: Generate in layers. First produce a runnable gray-box prototype (no art), then swap in assets. An example prompt structure:
Role: Senior web game developerGoal: A single-file runnable prototypeConstraints: No external assets, pure geometric placeholdersGameplay: WASD movement, mouse aiming, left-click shooting, three enemy wavesOutput: Complete runnable code + key parameter notes
Step 3: Externalize parameters. Centralize tunable values so you do not have to regenerate every time you adjust game feel:
const CONFIG = {playerSpeed: 220,bulletSpeed: 900,fireRate: 120,enemyHP: 3,waveCount: 3};
Step 4: Decouple assets from logic. Textures and sound effects go through general-purpose generation capabilities or placeholder assets, while the logic side depends only on interfaces, making replacement cost close to zero.
5. Quality Safeguards: Four Gates AI Output Must Pass
- Runnability: Can it start with zero configuration and produce no console errors?
- Frame stability: Does it drop frames as entity count rises? Add object pooling and culling if necessary.
- Input responsiveness: Is the latency from input to feedback acceptable, and are there dropped frames or swallowed inputs?
- Explainable failures: When something breaks, can you locate the specific module instead of regenerating the whole thing?
Engineering-wise, it is advisable to keep a minimal regression checklist and run it after each generation: startup, movement, firing, win/loss checks, restart.
6. Conclusion
AI has pulled the barrier from “zero to playable” extremely low, and a budget on the order of 20 CNY is enough to complete one real, playable prototype validation. But “from playable to fun” is still human work. The sensible approach is to use generative capabilities for divergence and first drafts, and engineering standards for convergence and polish. If a prototype needs public distribution and stable operation, you can layer on general cloud capabilities, such as object storage for static assets, a content delivery network to reduce latency, and logging and monitoring/alerting services to locate production issues, turning a low-cost experiment into a product that can iterate sustainably.
