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