Code2Games: Enabling Coding Agents for Gaming World Generation
Abstract
Generating a high-quality gaming world from a natural-language game intent requires joint reasoning about scene structure, spatial layout, gameplay objectives, interactive entities, and executable gameplay logic. Existing coding agents can generate individual assets, scenes, or scripts, but often struggle to maintain consistency across these components. We propose Code2Games, an agentic framework that builds a structured gaming world upon a base Blender world generated from the same game intent. Code2Games coordinates scene analysis, gameplay planning, constrained gaming-world generation, and gaming-engine customization through a shared scene-gameplay representation with persistent element correspondence. After world generation, Code2Games adapts the generated world to Unreal Engine 5 and employs an execution-guided reconstruction process that uses compilation diagnostics, runtime feedback, and gameplay test results to resolve inconsistencies arising during engine adaptation. To systematically evaluate gaming-world generation, we introduce the GameCode4D benchmark, which comprises ten fixed game prompts spanning different levels of scene and gameplay complexity. We evaluate the generated results across four dimensions: visual quality, interactive fidelity, multimodal artifact quality, and playable-game quality. Experiments demonstrate that, compared with direct gaming-world generation by coding agents and existing baseline methods, Code2Games consistently improves the visual quality and interactive fidelity of generated gaming worlds, as well as the quality of the resulting games after engine adaptation.
Create a lesson
Metadata
- Comments
- Code: https://github.com/AIGeeksGroup/Code2Games, Website: https://aigeeksgroup.github.io/Code2Games
Related papers
Video2World: Benchmarking Coding Agents for Interactive World Modeling from Embodied Videos
Shared title terminologycs.CVJinzhou Tang, Zijun Zhang, Jing Yang et al.
StateWeaver: Multi-Agent Coordination of Story-State Transitions for Long-Horizon Video Generation
Shared title terminologycs.CVModi Jin, Xuying Zhang, Yijing Guo et al.
VibeVideoAgent: Closing the Perceptual Loop for Code-Driven Video Generation
Shared title terminologycs.CVXuanyu Zheng, Luoyuan Zhang, Yancheng Long et al.
A Simple Yet Effective Agent for Open-World Aerial Object Search
Shared title terminologycs.CVJitai Hao, Liangxing Yang, Zhenyang Li et al.
WorldBridge: Bridging Scattered Views for Coherent 3D World Generation
Shared title terminologycs.CVWeilong Yan, Jingyu Hu, Hongli Xu et al.
ChronoWorld: Camera-Controlled Consistent 4D World Generation via Spatiotemporal Cues and Geometric Reflections
Shared title terminologycs.CVXiaoyu Zhou, Dingwei Xian, Zhenyu Wang et al.