GameGPT: Multi-agent Collaborative Framework for Game Development

Dake Chen, Hanbin Wang, Yunhao Huo, Yuzhao Li, Haoyang ZhangarXiv 2023 · DOI

Introduction

Game development is a complex endeavor requiring high precision and long-term consistency across massive codebases. While Large Language Models (LLMs) have advanced general software engineering, they face significant hurdles in the gaming domain, specifically hallucination (inventing non-existent engine functions) and redundancy (generating unnecessary tasks or bloated code). GameGPT is a multi-agent collaborative framework designed to automate this process while mitigating these issues through a "dual collaboration" approach and code decoupling.

The GameGPT Framework

The GameGPT architecture operates through five distinct stages: Planning, Task Classification, Code Generation, Task Execution, and Result Summarization. This structured workflow mimics a professional game studio, ensuring that each step is verified before proceeding.

Overview of the GameGPT framework workflow, showing the progression from user prompt to game engine testing.

Multi-Agent Roles and Dual Collaboration

To manage complexity, the framework assigns specific personas to different agents. This "separation of concerns" allows for internal checks and balances. A standout feature is "Dual Collaboration," where LLMs are paired with specialized "small" expert models (like BERT-based classifiers) for tasks such as identifying game genres or classifying task types. This grounding prevents the LLM from deviating into irrelevant or redundant code generation.

The 'Grand GameGPT Hotel' metaphor illustrating the specialized roles of the multi-agent system.

The roles include:

  • Game Development Manager: Receives user requests and initiates the planning phase.
  • Plan/Task Reviewers: Act as internal "adversaries" to catch errors before execution.
  • Game Engine Engineer: Focuses on code generation and system integration.
  • Testing Engineer: Validates the code within the game engine environment.

Technical Strategies for Precision

Beyond agent roles, GameGPT employs several technical strategies to ensure production-level quality:

  • Code Decoupling: Breaking down complex Lua scripts into smaller, manageable snippets to reduce the likelihood of mid-function hallucinations.
  • Layered Mitigation: Utilizing "in-house lexicons"—specialized dictionaries of game-specific terms—to ensure agents use the correct engine-specific syntax.
  • Human-in-the-Loop: A rectification stage allows human developers to review and adjust the AI's plan, serving as a final safety net.

Datasets and Training

The framework's performance is sharpened using specialized internal datasets:

  • In-house Planning Dataset: Input-output pairs of development requests and professional plans used for instruction tuning.
  • In-house Code Lexicon: Annotated code snippets for engine-specific precision.
  • Task Classification Dataset: Used to train the BERT-based expert model for accurate task categorization.

Key Results and Insights

Empirical results demonstrate that GameGPT successfully navigates from a simple prompt to a functional game script. By using standardized templates for major genres (Action, Strategy, RPG, Simulation, Adventure), the framework significantly reduces task redundancy. The multi-agent collaboration proved effective in identifying and fixing planning errors during review phases, while the decoupling approach ensured higher precision in the final code output. A key insight from this research is that "bloat" (redundancy) is as significant a bottleneck as hallucination in automated game development.

Limitations and Future Work

Current limitations include a continued dependency on human rectification for maximum reliability and a focus on script-based logic (Lua) rather than massive AAA assets. Future work aims to make the framework "engine-agnostic," allowing seamless transitions between popular engines like Unreal, Unity, and Godot.

Summary updated

BibTeX
@misc{chen2023gamegpt,
  author = {Dake Chen and Hanbin Wang and Yunhao Huo and Yuzhao Li and Haoyang Zhang},
  title = {{GameGPT: Multi-agent Collaborative Framework for Game Development}},
  year = {2023},
  eprint = {2310.08067},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.08067},
}
Figure