cs.AIOct 3, 2026

Spec2Game: Can LLMs Generate Complete Playable Games from Detailed Specifications?

Authors: Yixue Cai, Yuzhe Zhao, Hanxiang Chao, Qingsen Ma, Ziheng Xiong, Jinhu Qi, Irwin King

Organizations: The Chinese University of Hong Kong Hong Kong, China · Nankai University Tianjin, China · Wuhan University Wuhan, China

Abstract

Generating an executable program does not necessarily mean that it correctly implements the behavioral requirements specified in natural language. To evaluate large language models' ability to realize detailed specifications as complete interactive programs, we introduce Spec2Game, a benchmark that requires models to generate complete Pygame projects from detailed natural-language game specifications. Spec2Game comprises 15 game families and 150 task instances, with one canonical task and nine controlled rule variants per family, spanning three levels of implementation complexity. Using source-code, runtime, and visual evidence, we evaluate generated projects along four dimensions---Executability, Specification Realization, Code Quality, and User-Facing Quality. Across 14 LLMs and 3,330 generated projects, we find that high executability does not imply faithful specification realization. Component-level analysis further shows that models perform substantially better on Game Element Modeling than on Rule and Mechanism Modeling or Goal and Termination Modeling, indicating that faithfully implementing game rules and termination logic remains a major challenge.

Figures & tables

Appendix figures & tables30 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. GameCraft-Bench: Can Agents Build Playable Games End-to-End in a Real Game Engine?

    Jun 16, 2026Tongxu Luo, Rongsheng Wang, Jiaxi Bi +22AI Agent BenchmarksAgentic Code Generation

  2. Distilling Game Code World Model Generation into Lightweight Large Language Models

    May 23, 2026Tyrone Serapio, Arjun Prakash, Haoyang Xu +2LLM-Based Program Synthesis