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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Drake, Austin, Dong, Hang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915563254579200
author Drake, Austin
Dong, Hang
author_facet Drake, Austin
Dong, Hang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2510_16952
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Real-Time World Crafting: Generating Structured Game Behaviors from Natural Language with Large Language Models
Drake, Austin
Dong, Hang
Human-Computer Interaction
Computation and Language
H.5.2; I.2.7
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.
title Real-Time World Crafting: Generating Structured Game Behaviors from Natural Language with Large Language Models
topic Human-Computer Interaction
Computation and Language
H.5.2; I.2.7
url https://arxiv.org/abs/2510.16952