# shimakaze09/engine architecture

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

- Interactive diagram: https://gitdiagram.com/shimakaze09/engine
- Repository: https://github.com/shimakaze09/engine

## Overview

This is a C++ game engine whose main user workflow is authoring a project through Lua and the editor, then running it in the editor or standalone player. Runtime bootstraps the project and frame loop, simulates a world, prepares and renders frames, and provides scripting, physics, audio, and content services. Asset cooking and scene validation are supporting product capabilities. Edges use README statements or SOURCE INDEX references; unsampled subsystem internals and uncertain call paths are not expanded.

Main entry points: [`runtime/src/engine_pipeline.cpp`](https://github.com/shimakaze09/engine/blob/main/runtime/src/engine_pipeline.cpp) (Engine run loop), [`runtime/src/render_prep_pipeline.cpp`](https://github.com/shimakaze09/engine/blob/main/runtime/src/render_prep_pipeline.cpp) (Render preparation), [`content/src/asset_catalog.cpp`](https://github.com/shimakaze09/engine/blob/main/content/src/asset_catalog.cpp) (Asset catalog), [`editor/src/editor.cpp`](https://github.com/shimakaze09/engine/blob/main/editor/src/editor.cpp) (Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_apps["Applications"]
  node_editor_app["Editor app<br/>[main.cpp]"]
  node_player_app["Player app<br/>[main.cpp]"]
end

subgraph group_runtime["Runtime"]
  node_project["Project handling<br/>[project.cpp]"]
  node_engine["Engine run loop"]
  node_world["World simulation<br/>[world.cpp]"]
  node_scripting["Lua scripting<br/>[scripting.cpp]"]
end

subgraph group_authoring["Authoring"]
  node_editor["Editor<br/>[editor.cpp]"]
  node_validator["Scene validation<br/>[main.cpp]"]
end

subgraph group_content_render["Content and Rendering"]
  node_asset_catalog[("Asset catalog<br/>[asset_catalog.cpp]")]
  node_asset_packer["Asset cooking<br/>[main.cpp]"]
  node_asset_manager["Asset residency<br/>[asset_manager.cpp]"]
  node_render_prep["Render preparation"]
  node_renderer["Renderer"]
end

subgraph group_services["Engine Services"]
  node_physics["Physics<br/>[physics.cpp]"]
  node_audio["Audio<br/>[audio.cpp]"]
  node_core["Platform and core<br/>[platform.cpp]"]
end

node_game_author(("Game author"))

node_game_author -->|"authors with"| node_editor
node_game_author -->|"authors Lua"| node_scripting
node_editor_app -->|"starts"| node_engine
node_player_app -->|"runs"| node_engine
node_editor -.->|"edits through"| node_engine
node_engine -.->|"opens project"| node_project
node_engine -->|"uses platform"| node_core
node_engine -.->|"simulates"| node_world
node_engine -.->|"runs scripts"| node_scripting
node_engine -->|"steps physics"| node_physics
node_engine -->|"uses audio"| node_audio
node_engine -->|"streams assets"| node_asset_catalog
node_engine -.->|"prepares frame"| node_render_prep
node_render_prep -->|"reads world"| node_world
node_render_prep -->|"builds commands"| node_renderer
node_asset_catalog -->|"tracks requests"| node_asset_manager
node_asset_manager -.->|"loads meshes"| node_renderer
node_asset_packer -.->|"cooks assets"| node_asset_catalog
node_validator -->|"checks scenes"| node_project

click node_editor_app "https://github.com/shimakaze09/engine/blob/main/app/main.cpp"
click node_player_app "https://github.com/shimakaze09/engine/blob/main/player/main.cpp"
click node_editor "https://github.com/shimakaze09/engine/blob/main/editor/src/editor.cpp"
click node_project "https://github.com/shimakaze09/engine/blob/main/runtime/src/project.cpp"
click node_engine "https://github.com/shimakaze09/engine/blob/main/runtime/src/engine_pipeline.cpp"
click node_world "https://github.com/shimakaze09/engine/blob/main/runtime/src/world.cpp"
click node_scripting "https://github.com/shimakaze09/engine/blob/main/scripting/src/scripting.cpp"
click node_physics "https://github.com/shimakaze09/engine/blob/main/physics/src/physics.cpp"
click node_audio "https://github.com/shimakaze09/engine/blob/main/audio/src/audio.cpp"
click node_core "https://github.com/shimakaze09/engine/blob/main/core/src/platform.cpp"
click node_asset_catalog "https://github.com/shimakaze09/engine/blob/main/content/src/asset_catalog.cpp"
click node_asset_packer "https://github.com/shimakaze09/engine/blob/main/tools/asset_packer/main.cpp"
click node_asset_manager "https://github.com/shimakaze09/engine/blob/main/renderer/src/asset_manager.cpp"
click node_render_prep "https://github.com/shimakaze09/engine/blob/main/runtime/src/render_prep_pipeline.cpp"
click node_renderer "https://github.com/shimakaze09/engine/blob/main/renderer/src/command_buffer_flush.cpp"
click node_validator "https://github.com/shimakaze09/engine/blob/main/tools/engine_validate/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_app,node_player_app toneBlue
class node_project,node_engine,node_world,node_scripting toneAmber
class node_editor,node_validator toneMint
class node_asset_catalog,node_asset_packer,node_asset_manager,node_render_prep,node_renderer toneRose
class node_physics,node_audio,node_core,node_game_author toneIndigo
```

## Components

### Applications

- [Editor app](https://github.com/shimakaze09/engine/blob/main/app/main.cpp): `app/main.cpp`
- [Player app](https://github.com/shimakaze09/engine/blob/main/player/main.cpp): `player/main.cpp`

### Runtime

- [Project handling](https://github.com/shimakaze09/engine/blob/main/runtime/src/project.cpp): `runtime/src/project.cpp`
- [Engine run loop](https://github.com/shimakaze09/engine/blob/main/runtime/src/engine_pipeline.cpp): `runtime/src/engine_pipeline.cpp`
- [World simulation](https://github.com/shimakaze09/engine/blob/main/runtime/src/world.cpp): `runtime/src/world.cpp`
- [Lua scripting](https://github.com/shimakaze09/engine/blob/main/scripting/src/scripting.cpp): `scripting/src/scripting.cpp`

### Authoring

- [Editor](https://github.com/shimakaze09/engine/blob/main/editor/src/editor.cpp): `editor/src/editor.cpp`
- [Scene validation](https://github.com/shimakaze09/engine/blob/main/tools/engine_validate/main.cpp): `tools/engine_validate/main.cpp`

### Content and Rendering

- [Asset catalog](https://github.com/shimakaze09/engine/blob/main/content/src/asset_catalog.cpp): `content/src/asset_catalog.cpp`
- [Asset cooking](https://github.com/shimakaze09/engine/blob/main/tools/asset_packer/main.cpp): `tools/asset_packer/main.cpp`
- [Asset residency](https://github.com/shimakaze09/engine/blob/main/renderer/src/asset_manager.cpp): `renderer/src/asset_manager.cpp`
- [Render preparation](https://github.com/shimakaze09/engine/blob/main/runtime/src/render_prep_pipeline.cpp): `runtime/src/render_prep_pipeline.cpp`
- [Renderer](https://github.com/shimakaze09/engine/blob/main/renderer/src/command_buffer_flush.cpp): `renderer/src/command_buffer_flush.cpp`

### Engine Services

- [Physics](https://github.com/shimakaze09/engine/blob/main/physics/src/physics.cpp): `physics/src/physics.cpp`
- [Audio](https://github.com/shimakaze09/engine/blob/main/audio/src/audio.cpp): `audio/src/audio.cpp`
- [Platform and core](https://github.com/shimakaze09/engine/blob/main/core/src/platform.cpp): `core/src/platform.cpp`

### Other components

- **Game author**

## Connections

- Game author → Editor: authors with (evidence: `README.md`)
- Game author → Lua scripting: authors Lua (evidence: `README.md`)
- Editor app → Engine run loop: starts (evidence: `app/main.cpp`)
- Player app → Engine run loop: runs (evidence: `player/main.cpp`)
- Editor → Engine run loop: edits through (evidence: `README.md`)
- Engine run loop → Project handling: opens project (evidence: `README.md`)
- Engine run loop → Platform and core: uses platform
- Engine run loop → World simulation: simulates (evidence: `README.md`)
- Engine run loop → Lua scripting: runs scripts (evidence: `README.md`)
- Engine run loop → Physics: steps physics
- Engine run loop → Audio: uses audio
- Engine run loop → Asset catalog: streams assets (evidence: `runtime/src/engine_pipeline.cpp`)
- Engine run loop → Render preparation: prepares frame
- Render preparation → World simulation: reads world
- Render preparation → Renderer: builds commands
- Asset catalog → Asset residency: tracks requests
- Asset residency → Renderer: loads meshes
- Asset cooking → Asset catalog: cooks assets (evidence: `README.md`)
- Scene validation → Project handling: checks scenes (evidence: `tools/engine_validate/main.cpp`)
