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生成架构模型。通过这些模型,我们回答以下问题:游戏引擎中存在哪些子系统?哪些子系统更常相互耦合?这些子系统为什么会相互耦合?结果表明,平台无关性、资源管理、世界编辑器和核心子系统被其他子系统频繁包含,因此构成了游戏引擎的基础。此外,我们的方法表明,游戏引擎开发者可以理解子系统是否相关并划分职责,还可以评估子系统之间的关系是否适合该游戏引擎。