LLM Agent Coding in Practice: Building a Racing Game with Wish-Style Development

    This article explores wish-style development, an intent-driven approach where developers define goals, constraints, and acceptance criteria instead of writing code line by line, letting an LLM agent plan, use tools, run commands, and iterate. Using the example of recreating a playable racing game, it shows three prompt iterations—from a single-sentence wish to structured acceptance criteria and engineering requirements—and explains what to look beyond benchmark scores, why performance-cost Pareto improvements matter for long agent tasks, and how requirement layering, upfront acceptance, context control, and small-step validation make the approach reproducible.

    1. Introduction: Why Wish-Style Programming Is Worth Studying

    Large models have recently become a focus of engineering discussion in agent scenarios. Unlike traditional code completion, agent programming emphasizes that the model can autonomously plan tasks, call tools, execute commands, and keep correcting itself based on feedback. So-called “wish-style programming” is essentially an intent-centric development approach: instead of describing implementation details line by line, developers state the goal, constraints, and acceptance criteria clearly, and the model closes the loop from design to verification.

    This approach matters because it shifts the developer’s energy from “how to implement” to “what I want” and “how to verify it.” But the freer the wish, the higher the demands on the model: it must understand vague requirements, operate files in a terminal, run commands, read errors, and fix them iteratively. Using the recreation of a racing game as an example, this article presents the whole process and summarizes a reusable methodology.

    2. What to Watch When a Model Is Upgraded: Beyond Benchmark Scores

    When a model version is updated, the official release usually provides several benchmark results. For engineering practitioners, the absolute benchmark numbers have limited reference value; what really matters is which dimensions have improved significantly, because that hints at changes in the model’s capability boundaries on real tasks.

    • Terminal and automation capability: improvements on terminal and automation benchmarks mean the model is better at locating files, running builds, parsing logs, and fixing issues automatically in a command-line environment.
    • Programming problem-solving: progress on coding benchmarks reflects greater stability in algorithm implementation, edge-case handling, and debugging.
    • Coordination with tool frameworks: such gains are often tied to targeted optimization of the execution harness, meaning the model works more smoothly with the surrounding toolchain and reduces wasted round trips.

    For developers, the most reliable way to decide whether a new version is worth adopting is not to look at leaderboards but to run small controlled experiments on two or three real tasks from their own workload.

    3. A Long-Ignored Cost Factor: Pareto Improvement in Performance and Cost

    The industry has begun to emphasize a “performance-cost Pareto improvement”: the unit price stays the same, but completing the same task consumes fewer tokens in total, so the real cost drops. This is especially critical for agents.

    A single agent task is usually not “one request, one response” but a long-running process with many model calls, tool calls, and iterative loops. The longer the process, the more overhead accumulates from ineffective output, repeated reads, and pointless reflection. There are roughly three optimization directions:

    1. Reduce ineffective output: constrain redundant explanations and repeated summaries from the model.
    2. Shorten the task path: prefer the shortest actionable sequence of steps and avoid repeated trial and error.
    3. Increase information density per call: read enough context at once and reduce back-and-forth confirmation.

    The engineering takeaway is that when evaluating an agent solution, you should include the overall cost of completing the task and the end-to-end latency as metrics, rather than only looking at the per-token price.

    4. Practice: Building a Racing Game from a One-Sentence Wish

    The environment is an intelligent coding tool with terminal execution capability, calling a large model with strong agent capability through a standard interface. The goal is a playable racing game: drivable, with a track and timing, supporting a switch between the driver’s view and the rear view.

    Attempt 1: Pure Wishing

    The prompt was a single sentence:

    1. Make a racing game: drivable, with a track and timing, supporting a driver's view and a rear view.

    Result analysis: the landing page looked acceptable, and the core gameplay basically worked—driving, track, timing, and view switching were all present. But the visual style was rough, and details such as road texture, speed feedback, and collision hints clearly fell short of expectations. This shows that the model can cover the “functional skeleton” but struggles to automatically align with implicit needs such as aesthetics and polish.

    Attempt 2: Breaking the Wish into Verifiable Criteria

    The improved prompt used a three-part structure of “goal + constraints + acceptance”:

    1. Goal: Build a racing game that runs directly in the browser.
    2. Constraints:
    3. 1) Use a single-page app structure with local resources and no external dependencies;
    4. 2) The track is a closed loop with curves and straights;
    5. 3) The car has acceleration, braking, steering, and inertia;
    6. 4) Timing includes lap time and best lap, with the best result saved locally;
    7. 5) The view can be switched between driver and rear with one key.
    8. Acceptance:
    9. - Keyboard controls are smooth and the frame rate is stable;
    10. - Hitting a wall causes deceleration and a hint;
    11. - The best result is not lost after refreshing the page.

    This output improved clearly in structural completeness and playability, showing that verifiable criteria can effectively narrow the model’s freedom and turn vague aesthetics into concrete engineering constraints.

    Attempt 3: Adding Engineering Requirements

    After the functionality met the bar, non-functional requirements were added: code layering (separating rendering, physics, input, and UI), configurable key parameters, and a built-in debug switch to display collision boxes and frame time. The value of this round was to move the “toy” toward a maintainable example project.

    5. Methodology: Making Wish-Style Programming Stable and Reproducible

    • Layer requirements: functionality first, then experience, then engineering, avoiding piling up too many goals at once.
    • Define acceptance upfront: write “what counts as done” into the prompt to reduce subjective disputes.
    • Manage context: provide only necessary files and error snippets to control noise.
    • Validate in small steps: solve one type of problem per round and keep rollback-able intermediate versions.
    • Keep cost in mind: reaching the goal in fewer rounds is itself a practice of Pareto improvement.

    6. Conclusion

    Wish-style programming is not “thinking less”; it concentrates thinking on goal definition and acceptance design. As models keep improving in terminal operation, automated execution, and programming reasoning, and as they work deeply with execution frameworks, developers can turn a one-sentence wish into a runnable, maintainable, and extensible real project with fewer interaction rounds. This is both an efficiency gain and a gentle shift in the development paradigm.