arXiv:2510.16952cs.HCcs.CL2025-10

用自然语言实时生成游戏行为,让玩家自由创造新玩法。

Real-Time World Crafting: Generating Structured Game Behaviors from Natural Language with Large Language Models

  • 用领域特定语言约束LLM输出,安全注入游戏引擎。
  • GPT/Claude系列模型在创意表达上优于小模型。
  • 适合希望快速实现互动玩法的开发者和游戏设计师。

我们提出一种新型架构,将大型语言模型(LLM)安全集成到交互式游戏引擎中,使玩家能通过自然语言“编程”新行为。该框架通过使用LLM将指令翻译为受限的领域特定语言(DSL),在运行时配置自定义实体-组件-系统(ECS)。我们在一个2D魔法创作游戏原型中评估了Gemini、GPT和Claude系列模型,采用不同提示策略。经验证的LLM评判器对输出进行定性评分,结果显示:更大模型更准确捕捉创意意图,而最优提示策略取决于任务——链式思维(Chain-of-Thought)提升创意对齐度,少量示例则有助于生成更复杂的DSL脚本。本工作提供可复用的LLM-ECS模式,支持涌现式游戏设计,并为开发者提供量化性能对比。

原文摘要 · Abstract (English)

We present a novel architecture for safely integrating Large Language Models (LLMs) into interactive game engines, allowing players to "program" new behaviors using natural language. Our framework mitigates risks by using an LLM to translate commands into a constrained Domain-Specific Language (DSL), which configures a custom Entity-Component-System (ECS) at runtime. We evaluated this system in a 2D spell-crafting game prototype by experimentally assessing models from the Gemini, GPT, and Claude families with various prompting strategies. A validated LLM judge qualitatively rated the outputs, showing that while larger models better captured creative intent, the optimal prompting strategy is task-dependent: Chain-of-Thought improved creative alignment, while few-shot examples were necessary to generate more complex DSL scripts. This work offers a validated LLM-ECS pattern for emergent gameplay and a quantitative performance comparison for developers.

游戏AI自然语言LLM应用实时生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。