Game and Engine Flow
Flax Engine contains multiple advanced systems and can be extended in many areas. This documentation page explains the engine initialization process and general game flow.
Game scripts or plugins code is executed when all engine services are ready and initialized.
- Scripts - initialized during scene initialization, during loading. See script events execution order.
- Game Plugins - initialized when game starts but always before any scene is loaded.
- Editor Plugins - initialized when editer is opened.
The list below shows the flow of the engine with all services initialization order. When working with custom engine the most important parts of the engine core logic are inside file
Source\Engine\Engine\Engine.cpp. To learn more look into the engine log as well.
- Platform initialization
- Project info loading
- Logging initialization
- Engine services initialization
- Objects Removal Service
- Thread Pool
- Content Storage
- Job System
- Font Manager
- Content Loading Manager
- Assets Importing Manager (editor-only)
- Assets Exporting Manager (editor-only)
- Shader Cache Manager (editor-only)
- Shaders Compilation Service (editor-only)
- Debug Draw (editor-only)
- Game Settings
- Windows Manager
- Viewport Icons Renderer (editor-only)
- Scripts Builder (editor-only)
- Profiling Tools (editor-only)
- Editor Analytics (editor-only)
- Game Cooker (editor-only)
- Custom Editors Util (editor-only)
- Scene Manager
- Terrain Manager
- Atmosphere Pre Compute
- Particle Manager
- Probes Renderer (editor-only)
- ShadowsOfMordor Builder (editor-only)
- CSG Builder (editor-only)
- Prefab Manager
- Plugin Manager
- Application initialization (editor or game)
- Main window creation
- Main loop
- Idle if unatended
- Sleep if app paused (platform specific)
- Fixed Update
- Before Exit event
- Engine services disposing (reversed order)