ChatPaper.aiChatPaper

LLM辅助重构与无尽跑酷游戏玩法特征生成的探索性案例研究

An Exploratory Case Study of LLM-Assisted Refactoring and Gameplay Feature Generation in an Endless Runner Game

June 19, 2026
作者: Jan Wunderlich, Markus Kleffmann, Sebastian Lempert
cs.AI

摘要

大语言模型(LLMs)正越来越多地被用于支持软件开发,但它们在游戏开发实际应用场景中的实用性仍有待深入探索,尤其是在生成的代码需要集成到现有游戏软件系统的情况下。本文针对自定义Python/Pygame无限跑酷游戏中的GPT-4o模型,开展了一项探索性的实证案例研究。研究选取了六项开发任务:三项局部重构任务和三项涉及游戏玩法功能生成的任务。通过软件度量、单元测试和手动游戏评估对生成的实现方案进行了评估。在该案例研究中,三项重构任务在功能层面均成功完成,而三项游戏玩法功能生成任务中仅有一项实现了正确集成的功能。结果表明,在此场景下,GPT-4o处理局部变换的可靠性高于需要跨多个现有系统实现新游戏交互的任务。鉴于该探索性单一案例的设计,这些结果更宜视为指示性观察,而非类别层面模型性能的可推广证据。总体而言,本文通过透明化的案例叙事,揭示了LLM辅助重构与游戏玩法功能生成在现有游戏软件系统中的机遇与局限。
English
Large language models (LLMs) are increasingly used to support software development, but their practical usefulness in applied game-development settings remains underexplored, especially when generated code must be integrated into an existing game software system. This paper presents an exploratory empirical case study of GPT-4o in a custom Python/Pygame endless runner. The study examines six selected development tasks: three localized refactoring tasks and three tasks involving gameplay feature generation. The resulting implementations were evaluated using software metrics, unit tests, and manual gameplay assessments. In this case study, all three selected refactoring tasks were completed successfully in functional terms, whereas only one of the three selected gameplay feature generation tasks resulted in a correctly integrated feature. The findings suggest that, in this setting, GPT-4o handled localized transformations more reliably than tasks requiring new gameplay interactions across multiple existing systems. Given the exploratory single-case design, these results are best interpreted as indicative observations rather than as generalizable evidence of category-level model performance. Overall, the paper contributes a transparent case-based account of the opportunities and limitations of LLM-assisted refactoring and gameplay feature generation in an existing game software system.