Evaluating LLM Coding Capabilities: From UI Fidelity to Real-Time Interaction

    Evaluating LLM-generated software requires more than inspecting screenshots or measuring code generation speed. Using a glass-style desktop and a real-time strategy prototype as examples, this article explains how to assess visual fidelity, state management, simulation timing, pathfinding, and automated behavior. It also outlines targeted repair prompts, reproducible testing, and safe execution practices for determining whether generated code delivers reliable functionality.

    1. Evaluate Working Functionality, Not Just Generated Code

    Large language models can generate increasingly complete web applications. Beyond layouts and color schemes, they can implement dragging, window switching, resource growth, and unit movement. Yet there is still a substantial gap between looking like an application and actually meeting its requirements.

    An attractive screenshot captures only one moment. It does not prove that window focus is correct, simulation time is consistent, units cannot cross obstacles, or the application remains stable after extended use. Evaluation should therefore shift from how quickly a model writes code to how accurately it interprets requirements, how easily functionality can be verified, and how consistently the system behaves.

    Two practical tasks illustrate these challenges:

    • A retro glass-style desktop, which tests visual design, event handling, and window state management.
    • A real-time strategy prototype on a hexagonal map, which tests rule modeling, time progression, automated decisions, and coordination across subsystems.

    Together, these tasks cover several layers of capability, from interface presentation to application logic and from static rendering to continuous operation. They remain specific task samples, however, and cannot represent a model’s performance across all programming scenarios.

    2. Separate the Model from the Generation Environment and Preview Tools

    Many AI coding environments combine prompting, code editing, execution previews, and error feedback in one interface. This shortens the verification loop: developers can submit requirements, inspect the result, test interactions, and request fixes.

    But the final experience depends on more than the model. Relevant factors include:

    • Whether the input context is complete and includes previous revisions.
    • Whether output limits truncate the generated code.
    • Whether the runtime permits external resources.
    • Whether the preview viewport changes the layout.
    • Whether automatic retries, code patches, or additional instructions are applied.
    • Whether service queues, network transfers, or page execution introduce delays.

    As a result, identical prompts submitted through different interfaces do not necessarily produce directly comparable results. A slow page-generation experience might reflect queuing, code generation, or page initialization. Perceived waiting time alone does not establish the model’s reasoning speed.

    A better approach is to record separate timestamps for request submission, the start of the response, code completion, and the point at which the page becomes interactive. Preserve the environment configuration as well. Internal timing that cannot be observed should be marked as unknown rather than estimated.

    3. Case Study: A Draggable Glass-Style Desktop

    Turn Visual Requests into Testable Requirements

    “Build a classic desktop” is a broad instruction. Different people may imagine different window borders, icons, and switching behavior. A model may focus on gradients and transparent panels while overlooking essential interactions.

    Break the requirements into four layers:

    Layout: A desktop background, a bottom taskbar, multiple windows, and a clear stacking order.

    Visual design: Highlighted borders and shadows, translucent title bars, consistent button sizes and spacing, and readable text against complex backgrounds.

    Interaction: Windows can be dragged by their title bars and receive focus when clicked. Minimizing and restoring are linked correctly, and closed windows no longer respond to input.

    Window switching: A 3D switching mode lets users browse candidate windows, confirm a selection, or cancel. Exiting the mode restores the appropriate focus.

    This breakdown helps prevent decorative animation from being substituted for working functionality.

    Glass Effects Require More Than Transparency

    A translucent fill alone does not create a convincing glass effect. The result typically depends on background visibility, localized blur, fine borders, highlights, shadows, and depth working together.

    Greater transparency also tends to reduce content contrast. Check the readability of titles, buttons, and body text against both light and dark backgrounds. If the runtime does not support background blur, provide a more opaque fallback rather than leaving the content difficult to read.

    This is an easily overlooked evaluation criterion: visual effects should support readability, not merely produce an appealing screenshot.

    Dragging Is a State Management Problem

    The central challenge in dragging is not continuously changing coordinates. It is keeping input, focus, and position consistent.

    Maintain a coherent representation of:

    • Window identifiers, positions, and dimensions.
    • The currently focused window.
    • Window stacking order.
    • Minimized and maximized states.
    • The active drag operation and its initial pointer offset.
    • Window-switching mode and its candidates.

    Calculate the new position using the offset between the initial pointer location and the window’s top-left corner. This prevents the window from jumping when dragging begins. The drag should also continue if the pointer leaves the title bar.

    Apply suitable position constraints so that, at minimum, the title bar cannot move completely outside the visible area.

    For acceptance testing, perform a sequence such as drag → switch windows → minimize → restore → resize the viewport. One successful drag does not demonstrate that the window system is reliable.

    A 3D Switcher Needs a Complete Interaction Cycle

    A 3D arrangement is only a presentation technique. Functional window switching requires entering the mode, browsing candidates, selecting one, confirming or canceling, and exiting.

    Two details deserve particular attention:

    1. Can users accidentally interact with underlying windows while the switcher is active?
    2. Does confirming a selection actually update the active window, or does it merely stop the animation at a particular position?

    If focus and presentation disagree after the animation finishes, the display is correct but the state is wrong.

    4. Case Study: A Real-Time Strategy Prototype

    Moving from Turns to Real Time Requires a New Time Model

    A real-time strategy system is not created by removing the “Next Turn” button and periodically calling the old logic. Resources, movement, combat, and research must all advance according to continuous simulation time.

    A common structure separates simulation updates from rendering:

    1. accumulatedTime += elapsedTime
    2. while accumulatedTime >= fixedSimulationStep:
    3. updateResources()
    4. updateResearch()
    5. updateUnitDecisionsAndMovement()
    6. resolveCombat()
    7. accumulatedTime -= fixedSimulationStep
    8. renderCurrentState()

    A fixed timestep helps reduce the influence of display frame-rate changes on game rules. However, expensive updates can still create a backlog. Limit the number of catch-up updates per loop and define how the application handles a page that has been paused for a long time.

    Fairness between opposing sides depends on using the same timing rules, rather than starting independent timers that may drift apart.

    A Speed Slider Must Change the Simulation, Not Just Animation

    When users request speeds from 1× to 10×, first define which systems the setting affects.

    Resource generation, movement, attack cooldowns, research progress, and automated decisions should generally share the same simulation speed. Interface behavior, such as menu clicks and camera controls, should not simply accelerate by the same factor.

    Avoid applying the multiplier twice. If elapsed time has already been scaled, movement and resource calculations should not apply the same multiplier again. Otherwise, some systems may accelerate twice.

    A straightforward acceptance test is to start from the same initial state, run at different speeds, and compare resources and research progress after approximately equal amounts of simulated time. Animation speed alone is not sufficient evidence.

    Automatic Research Needs Rules, Not Just a Checkbox

    Automatic research requires at least a technology prerequisite structure, resource costs, a current research task, and capability changes when research finishes.

    When enabled, the system should:

    1. Identify technologies whose prerequisites are satisfied.
    2. Select a project using an explicit priority rule.
    3. Check whether sufficient resources are available.
    4. Deduct the cost and start research according to the defined rules.
    5. Apply the completed technology’s effects and look for the next project.

    The behavior when automatic research is disabled must also be explicit. Does disabling it stop only the selection of future projects, or does it cancel research already underway? Either design may be reasonable, but the implementation must be consistent.

    Resource deductions should be handled centrally to prevent research from starting repeatedly within one update cycle, causing duplicate charges or negative balances.

    Automatic Enemy Targeting Has Three Stages

    “All units automatically seek enemies” sounds simple, but it contains three distinct stages.

    Perception determines which enemy units or buildings can be detected. If the prototype has no visibility system, explicitly define the map as fully visible.

    Decision-making selects a target—for example, the nearest reachable enemy or a threat to a friendly city. Straight-line distance alone may select an unreachable target, so target selection must account for reachability.

    Execution moves the unit along a path, attacks once it enters range, and replans when the target becomes invalid.

    For small maps with uniform movement costs, breadth-first search can serve as a baseline. If terrain has different movement costs, use a search method suitable for weighted paths.

    As unit counts grow, avoid recalculating every unit’s path on every rendered frame. Recompute when a target changes, a route becomes blocked, or a scheduled decision interval is reached.

    Hexagonal Geometry Must Be Used Throughout the Logic

    A map that looks hexagonal does not necessarily follow hex-grid rules. A common error is to draw hexagonal cells while retaining four-direction adjacency, producing movement and attack ranges that conflict with the display.

    One general approach uses axial coordinates with a derived third coordinate, such that the three components sum to zero. The distance between two cells is half the sum of the absolute differences across those three components.

    Whatever representation is chosen, the following features must share consistent coordinate conversions:

    • Neighbor calculations and pathfinding.
    • Mapping pointer positions to map cells.
    • Unit movement and attack range.
    • Construction placement checks.
    • Visibility and highlighted regions.

    During acceptance testing, pay particular attention to clicks near edges and corners, and verify that movement behaves symmetrically in all six directions. Coordinate errors may not be immediately visible at the center of the map.

    5. Iterate with Minimal Fixes, Not Full Rewrites

    When a result falls short, repeatedly asking for it to be “more polished” or “further optimized” provides little diagnostic information. Such feedback can prompt broad rewrites that improve appearance while breaking logic.

    A more effective prompt has four parts:

    Goal: Describe the prototype to be delivered and its purpose.

    Constraints: State whether external dependencies are allowed, whether offline operation or a single-file implementation is required, and which existing features must remain unchanged.

    Acceptance criteria: Specify observable behavior, such as “Research must not begin when resources are insufficient” or “Canceling window switching must preserve the original focus.”

    Repair scope: Provide reproduction steps, expected behavior, actual behavior, and the permitted scope of changes.

    For example:

    After dragging a window, entering switching mode, and canceling, the current window loses focus. Check only focus restoration and switcher-state cleanup. Do not change the layout or colors.

    This approach reduces unrelated changes and makes successful repairs easier to verify.

    6. Build a Reproducible Evaluation Record

    For a given task, keep the prompt, runtime environment, and initial state fixed, then perform multiple independent generations. If the strategy prototype includes random maps or decisions, fix the random seed to reduce chance effects.

    Evaluation can be organized into five dimensions:

    Dimension Key question
    Requirement coverage Is each requirement implemented, or has a decorative substitute been used?
    Visual consistency Are hierarchy, spacing, transparency, and dynamic states coherent?
    Logical correctness Do resources, timing, paths, and state transitions follow the rules?
    Runtime stability Do repeated interactions, viewport changes, or extended operation cause failures?
    Maintainability Is state managed coherently, are module boundaries clear, and are errors easy to locate?

    Distinguish first-pass results from repaired results. Preserve the prompting rounds, manual edits, and observed failures.

    One successful run shows that a task may be achievable. Repeated, stable success provides stronger evidence of reliable delivery.

    7. Isolate and Inspect Generated Code Before Running It

    Treat automatically generated code as unreviewed input. Even a small game should preferably run in an isolated preview environment with unnecessary network access, downloads, and sensitive-data access restricted.

    Review external resource loading, dynamic code execution, storage access, clipboard operations, and event-listener cleanup. When stopping or resetting the application, verify that timers and background updates have also stopped so that the application does not continue consuming resources after its interface closes.

    If the goal is simply to evaluate interaction capabilities, prefer a minimal prototype with few dependencies and bundled resources. This improves reproducibility and reduces misleading results caused by environmental differences.

    Conclusion

    The most useful measure of an LLM’s coding capability is not whether one generated result looks impressive. It is whether the model can consistently translate natural-language requirements into a working, understandable, and verifiable system of rules.

    A glass-style desktop tests whether visuals and interactions remain aligned. A real-time strategy prototype tests whether timing, resources, paths, and decisions work together.

    Breaking requirements into states, rules, and acceptance criteria—and validating them through controlled environments, continuous interaction, and targeted repairs—provides a practical path from generated code that looks promising to software prototypes that can be trusted.