Game engines provide video game developers with a wide range of fundamental subsystems for creating games, such as 2D/3D graphics rendering, input device management, and audio playback. Developers often integrate these subsystems with other applications or extend them via plugins. To integrate or extend correctly, developers need a broad system architectural understanding. However, architectural information is not always readily available and is often overlooked in this kind of system. In this work, we propose an approach for game engine architecture recovery and explore the architecture of three popular open-source game engines (Cocos2d-x, Godot, and Urho3D). We perform manual subsystem detection and use Moose, a platform for software analysis, to generate architectural models. With these models, we answer the following questions: Which subsystems are present in game engines? Which subsystems are more often coupled with one another? Why are these subsystems coupled with each other? Results show that the platform independence, resource management, world editor, and core subsystems are frequently included by others and therefore act as foundations for the game engines. Furthermore, we show that, by applying our approach, game engine developers can understand whether subsystems are related and divide responsibilities. They can also assess whether relationships among subsystems are appropriate for the game engine.
翻译:游戏引擎为视频游戏开发者提供了创建游戏所需的各种基础子系统,例如2D/3D图形渲染、输入设备管理和音频播放。开发者常将这些子系统与其他应用集成,或通过插件进行扩展。为正确进行集成或扩展,开发者需具备广泛的系统架构理解。然而,架构信息并非总是易于获取,且在此类系统中常被忽视。本研究提出了一种游戏引擎架构恢复方法,并探索了三款流行的开源游戏引擎(Cocos2d-x、Godot和Urho3D)的架构。我们执行了手动子系统检测,并使用软件分析平台Moose生成架构模型。基于这些模型,我们回答了以下问题:游戏引擎中包含哪些子系统?哪些子系统更常相互耦合?这些子系统为何相互耦合?结果表明,平台独立性、资源管理、世界编辑器及核心子系统经常被其他子系统引用,因此构成了游戏引擎的基础。此外,本研究表明,通过应用该方法,游戏引擎开发者能够理解子系统间的关联并划分职责,同时也可评估子系统间的关系是否适用于该游戏引擎。