Hands-On with an AI Coding IDE: Building a Small Game End-to-End in Agent Mode

    This article walks through a hands-on test of an AI-powered coding IDE in its Agent mode, using a browser-based tank game as a practical test case. It covers how these tools have evolved from inline completion to autonomous agents, and evaluates the tool across four dimensions: onboarding, interaction design, task execution, and security control. You will learn how to set up the tool, choose between Ask and Agent modes, write effective requirements with clear acceptance criteria, and understand the trust boundary that governs file access and command execution. The article also shares a reference game loop implementation, explains the sensible division of labor between humans and agents, and offers practical engineering tips for getting better results from Agent mode. It is aimed at developers who want a realistic view of what current AI coding IDEs can and cannot do.

    1. Introduction: From Code Completion to Agent-Managed Development

    AI coding tools have evolved through roughly three stages:

    • Inline completion: predicts the next line or block based on context, with the developer confirming each line;
    • Conversational Q&A: answers one question at a time about errors, algorithms, or code explanations;
    • Autonomous agents: given a natural-language goal, independently handle analysis, planning, coding, running, and self-testing.

    The tool tested here sits in the third stage. It is both an AI coding IDE and a general-purpose agent workspace: once given a goal, it plans the steps, reads and writes files, runs commands, and iterates to verify results, while the developer takes on the roles of “requirement definer” and “result reviewer.”

    Many people still use it as a completion plugin. But if its main selling points are a rich selection of callable models and complete general-purpose capabilities, then a more sensible approach is to pick the right model for each task and hand execution over to Agent mode.

    1.1 Evaluation Dimensions

    To avoid drawing conclusions based only on “does it run,” this test observed the tool across four dimensions:

    Dimension Key Question
    Onboarding Is installation, login, and project loading smooth?
    Interaction design Are mode switching, model selection, and quota visibility clear?
    Task execution Can it independently plan, code, run, and deliver verifiable results?
    Security and control Are workspace trust, command execution, and code review controllable?

    1.2 Test Subject: A Browser Tank Game

    The test subject is a browser-based tank game, chosen for three reasons:

    1. Fully self-contained: it can be built with HTML, CSS, and vanilla JavaScript, with no extra dependencies or backend services;
    2. Easy to verify: the visuals and interactions are immediately obvious in the browser;
    3. Broad coverage: it includes typical modules such as maps, collision detection, enemy AI, the game loop, win/loss conditions, and scoring, which effectively tests the agent’s planning and implementation abilities.

    2. Installation and Initialization: Getting the Tool Running

    2.1 Getting and Installing

    Download the installer for your operating system (Windows, macOS, or Linux) from the official site and follow the prompts to install.

    It is worth noting that this kind of tool shares the same plugin extension ecosystem as traditional code editors. If you have already installed the matching command-line component during setup, its terminal commands become available automatically, with no extra configuration needed.

    2.2 The Beginner’s Wizard: Skippable

    On first launch, a user wizard appears and asks whether to import configuration data from another coding IDE, such as themes, keybindings, and installed extensions. Users who want it to work out of the box, or who prefer to keep the environment clean, can simply skip it; those with migration habits can follow the wizard as needed.

    2.3 Main Interface and Login

    After entering the main interface, the overall layout feels “lightweight”:

    • Left: the project file tree and session list;
    • Center: the code editor;
    • Right: the login entry, model conversation area, and task planning area.

    Compared with the visual clutter some traditional IDEs create by stacking menus, toolbars, sidebars, and status bars, this kind of tool has a cleaner interface, with core information concentrated on the conversation and task progress. Login supports two methods: QR code scanning and phone verification code. Both offer the same functionality, so pick whichever you prefer.

    3. Interaction Logic: Model Selection, Work Modes, and Quota

    3.1 Turn Off Auto Mode to Pick a Specific Model

    After logging in, there is an easy-to-miss detail: an “Auto” toggle sits below the dialog box.

    • When enabled, the tool automatically matches a model to the task, balancing capability, speed, and cost;
    • After disabling it, you can select a specific model from the model list.

    In testing, it is enabled by default. If you want to lock in a particular model for a side-by-side comparison, or evaluate code-generation differences across models, remember to turn it off first.

    Auto mode suits low-effort everyday development, while manual model selection is better for evaluation and debugging. These are two complementary approaches with different purposes.

    3.2 Ask vs. Agent: Two Work Modes

    The left side provides two modes by default, with clear boundaries:

    • Ask (Q&A): focused on explaining and answering, suited for reading unfamiliar code, troubleshooting errors, and understanding algorithm principles;
    • Agent: focused on execution, capable of reading and writing project files, running terminal commands, starting dev servers, and advancing tasks step by step according to a plan.

    A simple rule of thumb: choose Agent when you need to “change code and run programs,” and start with Ask when you need to “understand principles and locate causes.”

    3.3 Settings and Quota

    Click the gear button in the top-right corner to open settings. The bottom of the general page shows the remaining quota for the current account. Some model services offer trial or limited-time free quotas, so it is worth confirming the balance before starting a heavier task to avoid an interruption caused by running out of quota.

    4. Project Loading and Security Boundaries

    After you select a local folder as the project directory, the tool shows a confirmation window. Clicking “Yes, I trust the authors” indicates that you trust the directory and the code inside it, after which the agent can normally read and write files and run commands.

    This design is essentially a trust boundary: within the authorized directory, the agent has relatively high privileges, including installing dependencies, running scripts, and reading and writing files. This leads to two direct conclusions:

    1. Do not blindly grant trust in highly sensitive directories. Directories involving production configuration, credentials, or personal data should be operated on in a controlled environment following the principle of least privilege;
    2. Treat trust as a security decision, not a default next step. Before authorizing, confirm that the directory contents are trustworthy and the source is verifiable.

    5. Hands-On: Building a Browser Game in Agent Mode

    5.1 Preparation

    • Choose an empty folder as the project directory and confirm trust;
    • Turn off Auto mode below the input box and select a target model;
    • Keep Agent mode active;
    • Prepare a requirements description.

    5.2 Writing Requirements: Put Acceptance Criteria in the Prompt

    The more specific the natural-language requirement, the closer the agent’s output will be to expectations. The requirements description used in this test is shown below:

    1. Build a browser-based tank battle game using HTML + CSS + vanilla JavaScript (Canvas). Requirements:
    2. 1. Runs as a single page: opening index.html is enough to play, with no third-party libraries;
    3. 2. The player moves with WASD and fires with the spacebar, and can shoot enemy tanks;
    4. 3. Enemy tanks spawn randomly, move toward the player, and shoot;
    5. 4. Treat the screen edges as boundaries, and implement collision detection between tanks and bullets;
    6. 5. Display the current score, the player's remaining lives, and the remaining enemy count;
    7. 6. The game ends when the base is destroyed or the player's lives reach zero, with an option to restart.

    Item 1 constrains the tech stack and rules out unnecessary dependencies; items 2 through 6 break “fun” into individually verifiable feature points. This kind of writing significantly reduces the agent’s chances of misunderstanding.

    5.3 Task Breakdown: An Exposed Todo Plan

    After the requirement is submitted, you first see the model’s reasoning, followed by a task plan (a todo list), roughly as follows:

    1. [ ] Set up the index.html page skeleton and canvas container
    2. [ ] Write styles and the game status bar (score, lives, enemy count)
    3. [ ] Implement player tank movement, orientation, and shooting
    4. [ ] Implement enemy tank spawning, movement, and shooting logic
    5. [ ] Implement bullet movement and collision detection (tanks, boundaries, bullet-on-bullet)
    6. [ ] Implement scoring, lives, and base logic
    7. [ ] Start a local preview and verify it runs correctly

    The value of this list goes beyond showing progress:

    • Developers can catch and correct misunderstandings before execution, for example, whether “base” refers to a friendly structure to protect or the player’s current position;
    • The task is split into independently verifiable chunks, making it easier to pinpoint which step went wrong when something breaks;
    • Execution progress is clear at a glance, so there is no need to keep asking “how far along are we?”

    5.4 Execution and Iteration

    Once coding begins, the agent sequentially creates the page skeleton, canvas, stylesheet, and scripts, and keeps the plan status in sync.

    As for timing: this development took on the order of thirty minutes overall. It is worth stressing that elapsed time should not be used as a universal metric for evaluating the tool, since it depends on the model chosen, the precision of the requirements, network conditions, and task complexity. It is provided here for reference only.

    In terms of results, for small apps and games with clear boundaries and few dependencies, a runnable demo is an expected outcome as long as “the agent scheduling framework is mature enough” and “the model’s coding ability is strong enough.”

    5.5 Core Mechanism Example: The Game Loop

    On-screen updates in the game are driven by the “game loop.” Here is a reference implementation:

    1. // Example: game loop with a fixed time step
    2. const canvas = document.getElementById('game');
    3. const ctx = canvas.getContext('2d');
    4. let lastTime = performance.now();
    5. let accumulator = 0;
    6. const STEP = 1000 / 60; // logic update step, ~60Hz
    7. function loop(now) {
    8. accumulator += now - lastTime;
    9. lastTime = now;
    10. // fixed-step logic updates so movement speed and collision detection stay
    11. // consistent despite frame rate fluctuations
    12. while (accumulator >= STEP) {
    13. update(STEP);
    14. accumulator -= STEP;
    15. }
    16. render(ctx);
    17. requestAnimationFrame(loop);
    18. }
    19. requestAnimationFrame(loop);

    This uses a “fixed time step for logic updates + rendering that follows the refresh” approach. If logic were driven directly by per-frame elapsed time, movement speed would be too fast on high-refresh-rate screens, while collision detection would be prone to inaccuracy in low-frame-rate scenarios. Details like this are exactly what developers should focus on during acceptance.

    5.6 Local Running and Browser Preview

    After coding is complete, the agent handles starting the local runtime environment on its own and opens a preview window directly in the browser, so there is no need to set up a server manually. The final output is plain HTML, CSS, and JavaScript files that can be deployed to any static site hosting service.

    On Baidu AI Cloud, you can upload the output to object storage and enable static website hosting, or deploy it to a web application hosting service. With these general-purpose cloud capabilities, the demo can become a shareable link in a short time.

    6. Test Conclusions: Where the Human-Machine Split Makes Sense

    Overall, the conclusion of this test is that in scenarios with clearly bounded requirements and intuitive verification methods, “agent framework + a strong coding model” can independently complete the full loop from planning to delivery. At the same time, several areas still require human judgment:

    • Business goals: whether a game is fun and whether the level pacing is reasonable can only be defined by people;
    • Architecture decisions: how modules are layered and how data structures are designed require human oversight, especially as the task grows larger;
    • Quality acceptance: playability, performance, and compatibility need to be confirmed by people or automated tests;
    • Security review: auto-generated code and external dependencies still need review.

    7. Engineering Practice: Getting More from Agent Mode

    1. Think first, then hand off: stating the goal, tech stack, and acceptance criteria in one clear sentence saves more time than repeated rework.
    2. Move in small steps: break a large requirement into several independently verifiable tasks, and do a manual check after each one, rather than generating a large amount of code at once that becomes hard to debug.
    3. Use both modes well: go Ask first, then Agent. Let the model outline the approach and evaluate options, then switch to Agent for execution.
    4. Back it up with version control: initialize a Git repository before development and commit after each phase is complete. If the agent’s changes are unsatisfactory, you can roll back quickly.
    5. Keep the environment reproducible: pin the runtime environment and dependency versions, and record the startup commands so the next session can pick up directly.
    6. Stay mindful of security and compliance: do not let the agent run without constraints in an environment containing credentials or production configuration; review generated code and newly added dependencies.
    7. Set up automated acceptance: for small projects, add basic tests or check scripts so that every iteration has a quantifiable pass criterion.

    8. Summary

    The value of AI coding tools is not to make developers “lazy,” but to free them from repetitive work and let them focus on the areas that are hard for machines to replace: requirement definition, architecture design, and quality control.

    For most developers, a pragmatic path to getting started is this: pick a small project with clear boundaries, write down the requirements, tech stack, and acceptance criteria, run one full cycle in Agent mode, and then gradually move on to real-world scenarios.