# orgolis/c-engine-game architecture

> Architecture diagram of the GitHub repository orgolis/c-engine-game, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/orgolis/c-engine-game
- Repository: https://github.com/orgolis/c-engine-game

## Overview

GameWorldshaper is a Vulkan game engine paired with a project editor. The main creator workflow is to launch the editor, author a scene and assets, use Play to exercise the scene, then export a distributable game. Its runtime spans scene/ECS gameplay, rendering, physics, audio, scripting, and optional networking; editor extensions and the `gws` CLI are additional capabilities. The graph uses README-described capabilities and the sampled scene-playback code; unsampled subsystem internals and their call relationships are not inferred.

Main entry points: [`editor/src/main.cpp`](https://github.com/orgolis/c-engine-game/blob/main/editor/src/main.cpp) (Editor), [`engine/scene/include/scene.h`](https://github.com/orgolis/c-engine-game/blob/main/engine/scene/include/scene.h) (Scenes and entities), [`editor/src/scene_playback_manager.cpp`](https://github.com/orgolis/c-engine-game/blob/main/editor/src/scene_playback_manager.cpp) (Play mode), [`editor/src/online_game.cpp`](https://github.com/orgolis/c-engine-game/blob/main/editor/src/online_game.cpp) (Online sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Editor authoring"]
  node_editor["Editor<br/>[main.cpp]"]
  node_project["Projects<br/>[project.cpp]"]
  node_scene_tools["Scene authoring<br/>[editor_scene.cpp]"]
  node_terrain_tools["Terrain tools<br/>[level_tools.cpp]"]
  node_material_graph["Material graph"]
  node_vfx_timeline["VFX and timeline"]
  node_extensions["Editor extensions"]
  node_playback["Play mode"]
end

subgraph group_runtime["Game runtime"]
  node_scene["Scenes and entities<br/>[scene.h]"]
  node_ecs["ECS gameplay<br/>[world.h]"]
  node_physics["Physics<br/>[physics_world.h]"]
  node_renderer["Deferred renderer"]
  node_audio["Spatial audio<br/>[audio_engine.h]"]
  node_scripting["Scripting<br/>[script_system.cpp]"]
end

subgraph group_content["Content pipeline"]
  node_asset_import["Asset import<br/>[gltf_import.cpp]"]
  node_asset_store[("Cooked assets<br/>[pak.h]")]
end

subgraph group_online["Online play"]
  node_online_session["Online sessions<br/>[online_game.cpp]"]
  node_lobby["Lobby and transport<br/>[lobby_client.cpp]"]
end

subgraph group_delivery["Export and tools"]
  node_export["Game export<br/>[game_export.cpp]"]
  node_cli["GWS CLI<br/>[main.cpp]"]
end

node_creator(("Creator"))
node_player(("Player"))

node_creator -->|"authors in"| node_editor
node_creator -->|"launches project"| node_project
node_editor -->|"provides tools"| node_scene_tools
node_editor -->|"provides tools"| node_material_graph
node_editor -->|"provides tools"| node_vfx_timeline
node_editor -->|"provides tools"| node_terrain_tools
node_editor -->|"loads extensions"| node_extensions
node_creator -->|"starts Play"| node_playback
node_playback -->|"plays scene"| node_scene
node_playback -->|"builds physics"| node_physics
node_scene_tools -->|"authors scene"| node_scene
node_scene -.->|"uses gameplay ECS"| node_ecs
node_scene -.->|"renders scene"| node_renderer
node_scene -.->|"spatializes audio"| node_audio
node_asset_import -->|"cooks assets"| node_asset_store
node_project -.->|"imports assets"| node_asset_import
node_creator -->|"exports game"| node_export
node_export -->|"packages game"| node_player
node_player -->|"joins session"| node_online_session
node_online_session -->|"discovers lobby"| node_lobby
node_lobby -->|"relays connection"| node_online_session
node_creator -->|"runs commands"| node_cli
node_scripting -.->|"controls entities"| node_scene

click node_editor "https://github.com/orgolis/c-engine-game/blob/main/editor/src/main.cpp"
click node_project "https://github.com/orgolis/c-engine-game/blob/main/editor/src/project.cpp"
click node_scene_tools "https://github.com/orgolis/c-engine-game/blob/main/editor/src/editor_scene.cpp"
click node_terrain_tools "https://github.com/orgolis/c-engine-game/blob/main/editor/src/level_tools.cpp"
click node_material_graph "https://github.com/orgolis/c-engine-game/blob/main/editor/src/material_graph_panel.cpp"
click node_vfx_timeline "https://github.com/orgolis/c-engine-game/blob/main/editor/src/vfx_stack_panel.cpp"
click node_extensions "https://github.com/orgolis/c-engine-game/blob/main/editor/src/editor_extensions.cpp"
click node_playback "https://github.com/orgolis/c-engine-game/blob/main/editor/src/scene_playback_manager.cpp"
click node_scene "https://github.com/orgolis/c-engine-game/blob/main/engine/scene/include/scene.h"
click node_ecs "https://github.com/orgolis/c-engine-game/blob/main/engine/core/ecs/world.h"
click node_physics "https://github.com/orgolis/c-engine-game/blob/main/engine/core/physics/physics_world.h"
click node_renderer "https://github.com/orgolis/c-engine-game/blob/main/engine/renderer/include/deferred_renderer.h"
click node_audio "https://github.com/orgolis/c-engine-game/blob/main/engine/core/audio/audio_engine.h"
click node_scripting "https://github.com/orgolis/c-engine-game/blob/main/editor/src/script_system.cpp"
click node_asset_import "https://github.com/orgolis/c-engine-game/blob/main/engine/core/asset_pipeline/gltf_import.cpp"
click node_asset_store "https://github.com/orgolis/c-engine-game/blob/main/engine/core/asset_pipeline/pak.h"
click node_online_session "https://github.com/orgolis/c-engine-game/blob/main/editor/src/online_game.cpp"
click node_lobby "https://github.com/orgolis/c-engine-game/blob/main/engine/core/network/src/lobby_client.cpp"
click node_export "https://github.com/orgolis/c-engine-game/blob/main/editor/src/game_export.cpp"
click node_cli "https://github.com/orgolis/c-engine-game/blob/main/tools/gws/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_editor,node_project,node_scene_tools,node_terrain_tools,node_material_graph,node_vfx_timeline,node_extensions,node_playback toneBlue
class node_scene,node_ecs,node_physics,node_renderer,node_audio,node_scripting toneAmber
class node_asset_import,node_asset_store toneMint
class node_online_session,node_lobby toneRose
class node_export,node_cli,node_creator,node_player toneIndigo
```

## Components

### Editor authoring

- [Editor](https://github.com/orgolis/c-engine-game/blob/main/editor/src/main.cpp): `editor/src/main.cpp`
- [Projects](https://github.com/orgolis/c-engine-game/blob/main/editor/src/project.cpp): `editor/src/project.cpp`
- [Scene authoring](https://github.com/orgolis/c-engine-game/blob/main/editor/src/editor_scene.cpp): `editor/src/editor_scene.cpp`
- [Terrain tools](https://github.com/orgolis/c-engine-game/blob/main/editor/src/level_tools.cpp): `editor/src/level_tools.cpp`
- [Material graph](https://github.com/orgolis/c-engine-game/blob/main/editor/src/material_graph_panel.cpp): `editor/src/material_graph_panel.cpp`
- [VFX and timeline](https://github.com/orgolis/c-engine-game/blob/main/editor/src/vfx_stack_panel.cpp): `editor/src/vfx_stack_panel.cpp`
- [Editor extensions](https://github.com/orgolis/c-engine-game/blob/main/editor/src/editor_extensions.cpp): `editor/src/editor_extensions.cpp`
- [Play mode](https://github.com/orgolis/c-engine-game/blob/main/editor/src/scene_playback_manager.cpp): `editor/src/scene_playback_manager.cpp`

### Game runtime

- [Scenes and entities](https://github.com/orgolis/c-engine-game/blob/main/engine/scene/include/scene.h): `engine/scene/include/scene.h`
- [ECS gameplay](https://github.com/orgolis/c-engine-game/blob/main/engine/core/ecs/world.h): `engine/core/ecs/world.h`
- [Physics](https://github.com/orgolis/c-engine-game/blob/main/engine/core/physics/physics_world.h): `engine/core/physics/physics_world.h`
- [Deferred renderer](https://github.com/orgolis/c-engine-game/blob/main/engine/renderer/include/deferred_renderer.h): `engine/renderer/include/deferred_renderer.h`
- [Spatial audio](https://github.com/orgolis/c-engine-game/blob/main/engine/core/audio/audio_engine.h): `engine/core/audio/audio_engine.h`
- [Scripting](https://github.com/orgolis/c-engine-game/blob/main/editor/src/script_system.cpp): `editor/src/script_system.cpp`

### Content pipeline

- [Asset import](https://github.com/orgolis/c-engine-game/blob/main/engine/core/asset_pipeline/gltf_import.cpp): `engine/core/asset_pipeline/gltf_import.cpp`
- [Cooked assets](https://github.com/orgolis/c-engine-game/blob/main/engine/core/asset_pipeline/pak.h): `engine/core/asset_pipeline/pak.h`

### Online play

- [Online sessions](https://github.com/orgolis/c-engine-game/blob/main/editor/src/online_game.cpp): `editor/src/online_game.cpp`
- [Lobby and transport](https://github.com/orgolis/c-engine-game/blob/main/engine/core/network/src/lobby_client.cpp): `engine/core/network/src/lobby_client.cpp`

### Export and tools

- [Game export](https://github.com/orgolis/c-engine-game/blob/main/editor/src/game_export.cpp): `editor/src/game_export.cpp`
- [GWS CLI](https://github.com/orgolis/c-engine-game/blob/main/tools/gws/main.cpp): `tools/gws/main.cpp`

### Other components

- **Creator**
- **Player**

## Connections

- Creator → Editor: authors in (evidence: `README.md`)
- Creator → Projects: launches project (evidence: `README.md`)
- Editor → Scene authoring: provides tools (evidence: `README.md`)
- Editor → Material graph: provides tools (evidence: `README.md`)
- Editor → VFX and timeline: provides tools (evidence: `README.md`)
- Editor → Terrain tools: provides tools (evidence: `README.md`)
- Editor → Editor extensions: loads extensions (evidence: `README.md`)
- Creator → Play mode: starts Play (evidence: `README.md`)
- Play mode → Scenes and entities: plays scene (evidence: `editor/src/scene_playback_manager.cpp`)
- Play mode → Physics: builds physics (evidence: `editor/src/scene_playback_manager.cpp`)
- Scene authoring → Scenes and entities: authors scene (evidence: `README.md`)
- Scenes and entities → ECS gameplay: uses gameplay ECS
- Scenes and entities → Deferred renderer: renders scene
- Scenes and entities → Spatial audio: spatializes audio
- Asset import → Cooked assets: cooks assets (evidence: `README.md`)
- Projects → Asset import: imports assets
- Creator → Game export: exports game (evidence: `README.md`)
- Game export → Player: packages game (evidence: `README.md`)
- Player → Online sessions: joins session (evidence: `README.md`)
- Online sessions → Lobby and transport: discovers lobby (evidence: `README.md`)
- Lobby and transport → Online sessions: relays connection (evidence: `README.md`)
- Creator → GWS CLI: runs commands (evidence: `README.md`)
- Scripting → Scenes and entities: controls entities
