GameUIAgent: An LLM-Powered Framework for Automated Game UI Design with Structured Intermediate Representation

Paper · arXiv 2603.14724 · Published March 16, 2026
Self-Refinement and Self-Consistency

Abstract—Game UI design requires consistent visual assets across rarity tiers yet remains a predominantly manual process. We present GameUIAgent, an LLM-powered agentic framework that translates natural language descriptions into editable Figma designs via a Design Spec JSON intermediate representation. A six-stage neuro-symbolic pipeline combines LLM generation, deterministic post-processing, and a Vision-Language Model (VLM)-guided Reflection Controller (RC) for iterative self-correction with guaranteed non-regressive quality. Evaluated across 110 test cases, three LLMs, and three UI templates, cross-model analysis establishes a game-domain failure taxonomy (rarity-dependent degradation; visual emptiness) and uncovers two key empirical findings. A Quality Ceiling Effect (Pearson r=−0.96, p<0.01) suggests that RC improvement is bounded by headroom below a quality threshold—a visual-domain counterpart to test-time compute scaling laws. A Rendering-Evaluation Fidelity Principle reveals that partial rendering enhancements paradoxically degrade VLM evaluation by amplifying structural defects. Together, these results establish foundational principles for LLM-driven visual generation agents in game production. Index Terms—game user interface design, large language models, agentic iterative refinement, structured intermediate representation, VLM-as-judge

Introduction. Game user interface (UI) design fundamentally shapes player experience [1], [2]. Visual assets such as character cards and inventory thumbnails must balance aesthetic appeal, functional clarity, and thematic coherence—often across hundreds of elements spanning hierarchical rarity tiers (e.g., N/R/SR/SSR/UR in gacha-style games where collectible rarity governs visual fidelity). This remains a predominantly manual, labor-intensive process that constitutes a significant bottleneck in game art production pipelines [3]. Existing generative AI solutions typically target web interfaces or produce static raster images lacking editability. Figmaintegrated approaches—Figma Make [4], GUIDE [5], and CoGen [6]—operate single-shot without quality verification and lack game-domain rules such as rarity hierarchies. We propose GameUIAgent, a neuro-symbolic pipeline that decouples LLM creative generation from deterministic rendering via a Design Spec JSON intermediate representation, closing the perception-action loop through an independent Vision- Language Model (VLM)-guided Reflection Controller (RC).

An experimental finding motivates a key design constraint: adding gradient rendering without correcting layout intent worsens VLM evaluation, because enhanced rendering exposes structural defects previously concealed by flat colors. We term this the Rendering-Evaluation Fidelity Principle. This paper makes three primary contributions: 1) GameUIAgent and Design Spec JSON: an end-to-end pipeline from natural language to editable Figma game UI designs with guaranteed non-regressive quality improvement. 2) A game-domain failure taxonomy for LLM-based structured UI generation: two task-structural failure modes— rarity-dependent degradation (complexity-overload in Gemini; inverse over-generation in GPT-4o-mini across the N/R/SR/SSR/UR hierarchy) and visual emptiness (syntactically valid JSON yielding blank renders)—establish that JSON validity is necessary but insufficient for design quality. Five objective structural metrics further reveal a perceptual blind spot: few-shot scaffolding governs compositional richness (+38% Node Count, +42% Color Diversity) invisible to VLM perceptual evaluation yet critical for production-grade output. 3) Two empirical findings: the Quality Ceiling Effect bounding iterative self-correction (Pearson r=−0.96 with initial quality), and the Rendering-Evaluation Fidelity Principle demonstrating how mismatched rendering fidelity can invert VLM reward signals—establishing foundational design principles for LLM-driven visual generation agents.

Related work. AI in Game UI Design. Recent surveys [7] identify UI asset creation as a key emerging LLM application in games. pix2code [8] and Design2Code [9] pioneered UI-tocode generation for web interfaces, while LayoutGPT [10] demonstrates compositional layout planning. These methods target standard interfaces ill-suited to the non-standard layouts of game UI. Two concurrent works address structured game UI directly: AutoGameUI [11] assembles UIs from existing designs via multimodal matching; SpecifyUI [12] extracts hierarchical IR from reference screenshots using designer feedback. Both differ fundamentally from GameUIAgent, which performs text-to-new-design generation combined with automated quality verification. LLMs for Iterative Refinement and Evaluation. Re- Act [13], Reflexion [14], and SELF-REFINE [15] demonstrate LLM improvement via verbal feedback. A critical limitation remains: LLMs cannot reliably self-correct when acting as their own judges [16], [17], and self-improvement can degrade performance [18]. GameUIAgent mitigates this failure mode by sourcing feedback from an independent VLM critic and employing state-tracking to guarantee non-regressive improvement. The LLM-as-Judge paradigm [19] underpins our evaluator; to our knowledge, we provide the first Intraclass Correlation Coefficient [ICC(2,1)] [20], [21] reliability quantification for VLM-as-Judge on visual design quality. Test-Time Compute Scaling. Recent work demonstrates that extending inference compute via iterative refinement can outperform scaling model parameters in certain regimes [22]. A critical open question is when additional refinement cycles yield diminishing returns. Our Quality Ceiling Effect provides a principled answer in the visual design domain: gain is bounded by evaluator headroom, not generator capacity, once output quality approaches the evaluator’s distinguishability threshold—making evaluator quality the primary lever for scaling agentic iterative refinement.

Method. Fig. 1 illustrates GameUIAgent’s six-stage pipeline bridging natural language intent with professional design tools. Consistent with established agent frameworks [23], [24], the architecture integrates LLM-based creative generation, deterministic post-processing, and a self-correcting VLM-driven Reflection Controller. Concretely, the six stages are: (1) prompt engineering, (2) LLM generation of Design Spec JSON, (3) intelligent post-processing (repair, data injection, rarity enhancement), (4) renderer-based rasterization (Figma plugin or Python preview), (5) VLM quality review, and (6) Reflection Controller agentic loop. Three templates are supported: Character Card (320×450 px, vertical hierarchy), Item Thumbnail (96×96 px, compact grid), and Skill Panel (280×360 px, list composition). All prompts are centralized in a unified module; the system is model-agnostic, supporting any OpenAI-compatible LLM. A Python backend exposes HTTP REST endpoints that the Figma plugin queries to obtain finalized Design Spec JSON; a lightweight Python preview renderer enables high-throughput VLM evaluation without interactive Figma sessions.

The Design Spec JSON schema is the central enabling contribution. It is LLM-friendly (natural naming aligned with pre-training data distributions), tool-agnostic (grounded in universal vector-graphics primitives transferable to Sketch or Adobe XD), and expressive (encoding gradient fills, drop shadows, and auto-layout constraints). The schema defines a recursive node tree in which each node specifies geometry (x, y, width, height), visual style (fills, strokes, effects), text content (characters), and hierarchical relationships (children). Four node types are supported: FRAME, RECTANGLE, ELLIPSE, and TEXT. A token budget of 6,000 per call accommodates complex URtier designs (average 4,534 tokens for DeepSeek V3).

Raw LLM outputs are enhanced in three deterministic phases. (1) Repair: color values are normalized (0–255 integer RGB to 0–1 float) and geometric dimensions clamped to positive integers. (2) Data Injection: stat bar widths are computed algorithmically from attribute values, achieving numerical precision beyond standard LLM capabilities. (3) Rarity Enhancement: a Rarity Progression System injects tierscaled visual decorators across N/R/SR/SSR/UR—including star badges (0–5 icons), progressively upgraded border styles (simple strokes at N through multi-layer glow at UR), and element-specific thematic gradients.

A VLM evaluates generated designs across five dimensions: Layout (SL, alignment and spacing), Consistency (SC, color themes and font hierarchy), Readability (SR, text contrast), Completeness (SP , presence of required game elements), and Aesthetics (SA, visual appeal and rarity appropriateness). Each dimension is scored 1–10 under a standardized rubric applied uniformly across all evaluation contexts.

The Reflection Controller (Algorithm 1) implements a selfcorrecting agentic loop inspired by SELF-REFINE [15] and Reflexion [14]. Given VLM scores s = (SL, SC, SR, SP , SA), the controller identifies the two lowest-scoring dimensions and formulates a targeted Refinement Prompt with dimensionspecific repair instructions (e.g., “Increase text contrast ratio > 4.5:1” for low SR; “Add missing rarity_stars nodes” for low SP ). This surgical repair strategy preserves correct elements while correcting only flagged deficiencies. The loop terminates when Savg ≥θ (convergence) or k = K (budget exhaustion), performing up to K+1 VLM evaluations in total (k = 0, 1, . . . , K); best-result tracking guarantees the returned Design Spec is never inferior to initial output. The sampling temperature is reduced from 0.7 to 0.5 during refinement to encourage conservative corrections. The controller constitutes a finite-horizon Markov Decision Process (MDP) where defining the episode return as G = max0≤t≤K Savg(ˆqt) ensures best-result tracking yields nonregressive quality, precluding the score regression common in self-refining agents.

Discussion. Design Principles. The ablation establishes an actionable hierarchy for LLM-driven UI generation: structured prompt design is the foundational quality enabler; post-processing is the primary perceptual driver (+1.4 VLM, +2.2 Readability; Wilcoxon, No-FS vs. No-Post-Proc on matched preview renders); and the few-shot exemplar functions as a structural amplifier (38% Node Count gain) whose contribution is invisible to VLM perceptual evaluation but critical for compositional richness. All three components are non-negotiable in production deployment. Rendering-Evaluation Fidelity Principle. Formally, let ˆqt = VLM(render(dt)) denote the observable quality signal for design dt with true quality qt. Under the Gradient renderer, ˆqt < qt: gradient shading amplifies the salience of overlapping elements concealed by flat colors, inverting the VLM reward signal. Under the Layout-aware renderer, ˆqt ≈qt, since Auto Layout simulation resolves overlaps prior to graphical enhancement. Consequently, synchronized improvements across both rendering tiers—graphical fidelity and spatial correctness—are necessary for reliable agentic refinement. The Quality Ceiling Effect (r = −0.96) quantifies reward saturation in the visual domain, drawing a direct parallel to test-time compute scaling laws [22]. These principles apply broadly to any LLM agent that synthesizes structured visual specifications and refines them based on rendered perceptual feedback. Practical RC Deployment. The Quality Ceiling Effect translates directly into a tier-aware compute allocation policy: (i) if init< 6.0, apply K ≤2 RC cycles (expected ∆> +0.9); (ii) if 6.0 ≤init< 7.5, K ≤2 is recommended (∆≈+0.5– 0.7); (iii) if init≥7.5, RC should be skipped (∆≈0); and (iv) upon detecting a late-iteration score dip within K ≤2 (e.g., sk=2 <s∗), extending to K ≤3 may exploit a plateau-breaking event (as in CC-001, 7.0 →7.0 →6.4 →8.0, inaccessible at K ≤2). The threshold θ=7.5 performs consistently across the conditions evaluated here; practitioners should calibrate it to approximately the 80th percentile of their generator’s output distribution. Limitations. The evaluation covers RPG gacha UIs exclusively; FPS HUDs and RTS minimaps remain unvalidated. The current schema supports four primitive node types, whereas production demands vector paths and image fills. Portrait regions are rendered as placeholders, and animation or interactive states are not modeled. Cross-template comparisons involve heterogeneous rendering environments; this confound is bounded at ≤0.1 points by restricting ∆comparisons to renderer-consistent conditions. The cross-model comparison (RQ1) reflects three representative API configurations spanning the quality–cost–speed design space; the identified failure modes—rarity-dependent degradation and visual emptiness— are posited as task-structural properties of LLM-based structured generation, expected to persist across model generations, while specific validity rates and quality scores will shift with newer generators. The framework’s model-agnostic design and released 110-case evaluation suite support direct replication with current SoTA models. Beyond model coverage, the primary limitation of the current work is the absence of human expert evaluation. All quality assessments rely on GPT-4o as an automated VLM critic; while ICC(2,1) = 0.555 confirms adequate within-evaluator reliability for comparative analyses, external validity—the correlation between VLM scores and professional designer judgment—remains unestablished. Recent work on LLM-as-Judge has demonstrated moderateto-strong agreement with human annotators in adjacent domains [19], and our per-design stability (mean MAD = 0.15 across three evaluation runs) suggests systematic rather than random scoring.

Conclusion. We present GameUIAgent, a neuro-symbolic framework bridging natural language descriptions and professional game UI design through a Design Spec JSON intermediate representation. By combining LLM generation with an independent VLM-driven Reflection Controller, the system delivers editable Figma outputs with a formal guarantee of non-regressive quality improvement across 110 evaluated cases. A cross-model failure taxonomy establishes raritydependent degradation and visual emptiness as task-structural failure modes persistent across LLM families, with structural analysis revealing a perceptual blind spot where few-shot scaffolding governs compositional richness (+38% NC, +42% CD) invisible to VLM perceptual scoring. Two empirical findings further establish foundational principles for visual agentic systems. The Quality Ceiling Effect (r = −0.96) reveals that iterative improvement is bounded by evaluator headroom—where evaluation capability, not generation power, becomes the limiting factor. The Rendering- Evaluation Fidelity Principle warns that incomplete rendering enhancements paradoxically invert reward signals by amplifying structural defects. As AI tools evolve from single-shot generation toward autonomous iterative refinement in game production, rigorous alignment among structural constraints, rendering fidelity, and evaluation mechanisms will be paramount. The framework’s model-agnostic design and released 110-case evaluation suite enable direct replication as more capable LLMs emerge, extending these findings beyond the three model configurations evaluated here.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

Can AI systems formally evaluate design quality and taste? How reliably do benchmark metrics reflect actual model capability? Can visual rendering-based rewards effectively improve code and layout quality? How should design principles adapt for AI-generated interfaces? Do language models learn genuine linguistic structure or just surface patterns?