# otb2124/ossianforge architecture

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

- Interactive diagram: https://gitdiagram.com/otb2124/ossianforge
- Repository: https://github.com/otb2124/ossianforge

## Overview

OssianForge is a data-driven C# 3D game engine. Game authors define scenes, actions, input bindings, and state machines as content; at runtime, the app initializes the engine, loads resources and builds the node tree, then updates physics/input and renders the scene. The node/property model is the central gameplay layer, with reflection-based dispatch connecting configured actions to behavior. The README documents major capabilities not visible in sampled implementations; those are represented at subsystem level. Edges are limited to relationships shown in excerpts, the source index, or README statements.

Main entry points: [`Engine/Engine.cs`](https://github.com/otb2124/ossianforge/blob/master/Engine/Engine.cs) (Engine lifecycle), [`Engine/Resources/Resources.cs`](https://github.com/otb2124/ossianforge/blob/master/Engine/Resources/Resources.cs) (Resource manager), [`Engine/Resources/Types/Config`](https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Types/Config) (Content configs), [`Engine/Nodes/Nodes.cs`](https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Nodes.cs) (Node tree)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_app["Application<br/>[App.cs]"]
  node_engine["Engine lifecycle<br/>[Engine.cs]"]
  node_debug["Debug console<br/>[DebugConsole.cs]"]
end

subgraph group_content["Content and dispatch"]
  node_resources["Resource manager<br/>[Resources.cs]"]
  node_loader["Resource loading"]
  node_config["Content configs"]
  node_dispatcher["Action dispatcher"]
  node_scriptpacks["Script packs"]
end

subgraph group_scene["Scene and behavior"]
  node_sceneconfig["Scene and tree configs"]
  node_nodes["Node tree<br/>[Nodes.cs]"]
  node_manager["Node manager<br/>[NodeManager.cs]"]
  node_node["Node and properties<br/>[Node.cs]"]
  node_transform["Transforms"]
  node_gameplayprops["Gameplay properties"]
end

subgraph group_systems["Engine systems"]
  node_input["Input system<br/>[Inputs.cs]"]
  node_physics["Physics worlds<br/>[Physics.cs]"]
  node_audio["Audio playback<br/>[Audio.cs]"]
  node_ui["UI interaction<br/>[UI.cs]"]
end

subgraph group_presentation["Presentation"]
  node_graphics["Graphics and window<br/>[Graphics.cs]"]
  node_batch["Mesh batching<br/>[Batch.cs]"]
  node_meshresource["Mesh resources<br/>[MeshResource.cs]"]
  node_postprocess["Post-processing"]
end

node_developer(("Game author"))
node_opengl{{"OpenGL"}}
node_jitter{{"Jitter2"}}
node_openal{{"OpenAL"}}

node_developer -->|"authors data"| node_config
node_app -->|"drives lifecycle"| node_engine
node_engine -->|"initializes and renders"| node_graphics
node_engine -->|"loads resources"| node_resources
node_engine -->|"updates nodes"| node_nodes
node_engine -->|"updates input"| node_input
node_engine -->|"updates physics"| node_physics
node_engine -->|"initializes audio"| node_audio
node_engine -->|"updates and renders"| node_ui
node_engine -->|"starts console"| node_debug
node_resources -->|"delegates loading"| node_loader
node_loader -.->|"loads typed content"| node_config
node_resources -->|"executes actions"| node_dispatcher
node_resources -->|"creates script instances"| node_scriptpacks
node_nodes -->|"reads tree and scene"| node_resources
node_nodes -->|"registers and updates"| node_manager
node_manager -->|"walks node tree"| node_node
node_node -->|"updates properties"| node_gameplayprops
node_node -.->|"attaches transform"| node_transform
node_input -->|"reads bindings"| node_config
node_graphics -->|"renders batches"| node_batch
node_batch -->|"draws meshes"| node_meshresource
node_graphics -->|"uses post stack"| node_postprocess
node_batch -->|"draws via"| node_opengl
node_physics -->|"integrates physics"| node_jitter
node_audio -->|"plays through"| node_openal
node_sceneconfig -->|"defines scene data"| node_config
node_gameplayprops -.->|"invokes configured actions"| node_dispatcher

click node_app "https://github.com/otb2124/ossianforge/blob/master/App/App.cs"
click node_engine "https://github.com/otb2124/ossianforge/blob/master/Engine/Engine.cs"
click node_resources "https://github.com/otb2124/ossianforge/blob/master/Engine/Resources/Resources.cs"
click node_loader "https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Load"
click node_config "https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Types/Config"
click node_dispatcher "https://github.com/otb2124/ossianforge/blob/master/Engine/Reflection/ReflectionDispatcher.cs"
click node_scriptpacks "https://github.com/otb2124/ossianforge/tree/master/Content/ScriptFiles"
click node_sceneconfig "https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Types/Config"
click node_nodes "https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Nodes.cs"
click node_manager "https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/NodeManager.cs"
click node_node "https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Node.cs"
click node_transform "https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Props/Types/Transform/TransformProperty.cs"
click node_gameplayprops "https://github.com/otb2124/ossianforge/tree/master/Engine/Nodes/Props/Types"
click node_input "https://github.com/otb2124/ossianforge/blob/master/Engine/Inputs/Inputs.cs"
click node_physics "https://github.com/otb2124/ossianforge/blob/master/Engine/Physics/Physics.cs"
click node_audio "https://github.com/otb2124/ossianforge/blob/master/Engine/Audio/Audio.cs"
click node_ui "https://github.com/otb2124/ossianforge/blob/master/Engine/UI/UI.cs"
click node_graphics "https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/Graphics.cs"
click node_batch "https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/Batch/Batch.cs"
click node_meshresource "https://github.com/otb2124/ossianforge/blob/master/Engine/Resources/Types/Meshes/MeshResource.cs"
click node_postprocess "https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/RenderTarget/PostProcessStack.cs"
click node_debug "https://github.com/otb2124/ossianforge/blob/master/Engine/Utils/Console/DebugConsole.cs"

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_app,node_engine,node_debug toneBlue
class node_resources,node_loader,node_config,node_dispatcher,node_scriptpacks toneAmber
class node_sceneconfig,node_nodes,node_manager,node_node,node_transform,node_gameplayprops toneMint
class node_input,node_physics,node_audio,node_ui toneRose
class node_graphics,node_batch,node_meshresource,node_postprocess,node_developer,node_opengl,node_jitter,node_openal toneIndigo
```

## Components

### Runtime orchestration

- [Application](https://github.com/otb2124/ossianforge/blob/master/App/App.cs): `App/App.cs`
- [Engine lifecycle](https://github.com/otb2124/ossianforge/blob/master/Engine/Engine.cs): `Engine/Engine.cs`
- [Debug console](https://github.com/otb2124/ossianforge/blob/master/Engine/Utils/Console/DebugConsole.cs): `Engine/Utils/Console/DebugConsole.cs`

### Content and dispatch

- [Resource manager](https://github.com/otb2124/ossianforge/blob/master/Engine/Resources/Resources.cs): `Engine/Resources/Resources.cs`
- [Resource loading](https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Load): `Engine/Resources/Load`
- [Content configs](https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Types/Config): `Engine/Resources/Types/Config`
- [Action dispatcher](https://github.com/otb2124/ossianforge/blob/master/Engine/Reflection/ReflectionDispatcher.cs): `Engine/Reflection/ReflectionDispatcher.cs`
- [Script packs](https://github.com/otb2124/ossianforge/tree/master/Content/ScriptFiles): `Content/ScriptFiles`

### Scene and behavior

- [Scene and tree configs](https://github.com/otb2124/ossianforge/tree/master/Engine/Resources/Types/Config): `Engine/Resources/Types/Config`
- [Node tree](https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Nodes.cs): `Engine/Nodes/Nodes.cs`
- [Node manager](https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/NodeManager.cs): `Engine/Nodes/NodeManager.cs`
- [Node and properties](https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Node.cs): `Engine/Nodes/Node.cs`
- [Transforms](https://github.com/otb2124/ossianforge/blob/master/Engine/Nodes/Props/Types/Transform/TransformProperty.cs): `Engine/Nodes/Props/Types/Transform/TransformProperty.cs`
- [Gameplay properties](https://github.com/otb2124/ossianforge/tree/master/Engine/Nodes/Props/Types): `Engine/Nodes/Props/Types`

### Engine systems

- [Input system](https://github.com/otb2124/ossianforge/blob/master/Engine/Inputs/Inputs.cs): `Engine/Inputs/Inputs.cs`
- [Physics worlds](https://github.com/otb2124/ossianforge/blob/master/Engine/Physics/Physics.cs): `Engine/Physics/Physics.cs`
- [Audio playback](https://github.com/otb2124/ossianforge/blob/master/Engine/Audio/Audio.cs): `Engine/Audio/Audio.cs`
- [UI interaction](https://github.com/otb2124/ossianforge/blob/master/Engine/UI/UI.cs): `Engine/UI/UI.cs`

### Presentation

- [Graphics and window](https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/Graphics.cs): `Engine/Graphics/Graphics.cs`
- [Mesh batching](https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/Batch/Batch.cs): `Engine/Graphics/Batch/Batch.cs`
- [Mesh resources](https://github.com/otb2124/ossianforge/blob/master/Engine/Resources/Types/Meshes/MeshResource.cs): `Engine/Resources/Types/Meshes/MeshResource.cs`
- [Post-processing](https://github.com/otb2124/ossianforge/blob/master/Engine/Graphics/RenderTarget/PostProcessStack.cs): `Engine/Graphics/RenderTarget/PostProcessStack.cs`

### Other components

- **Game author**
- **OpenGL**
- **Jitter2**
- **OpenAL**

## Connections

- Game author → Content configs: authors data
- Application → Engine lifecycle: drives lifecycle (evidence: `App/App.cs`)
- Engine lifecycle → Graphics and window: initializes and renders (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Resource manager: loads resources (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Node tree: updates nodes (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Input system: updates input (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Physics worlds: updates physics (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Audio playback: initializes audio (evidence: `Engine/Engine.cs`)
- Engine lifecycle → UI interaction: updates and renders (evidence: `Engine/Engine.cs`)
- Engine lifecycle → Debug console: starts console (evidence: `Engine/Engine.cs`)
- Resource manager → Resource loading: delegates loading (evidence: `Engine/Resources/Resources.cs`)
- Resource loading → Content configs: loads typed content (evidence: `Engine/Resources/Load/NodeDependency.cs`)
- Resource manager → Action dispatcher: executes actions (evidence: `Engine/Reflection/ReflectionDispatcher.cs`)
- Resource manager → Script packs: creates script instances (evidence: `Engine/Resources/Resources.cs`)
- Node tree → Resource manager: reads tree and scene (evidence: `Engine/Nodes/Nodes.cs`)
- Node tree → Node manager: registers and updates (evidence: `Engine/Nodes/Nodes.cs`)
- Node manager → Node and properties: walks node tree (evidence: `Engine/Nodes/NodeManager.cs`)
- Node and properties → Gameplay properties: updates properties (evidence: `Engine/Nodes/Node.cs`)
- Node and properties → Transforms: attaches transform (evidence: `Engine/Nodes/Props/Types/Transform/TransformProperty.cs`)
- Input system → Content configs: reads bindings (evidence: `Engine/Inputs/KeyHandler.cs`)
- Graphics and window → Mesh batching: renders batches (evidence: `Engine/Graphics/Graphics.cs`)
- Mesh batching → Mesh resources: draws meshes (evidence: `Engine/Graphics/Batch/Batch.cs`)
- Graphics and window → Post-processing: uses post stack (evidence: `Engine/Graphics/Graphics.cs`)
- Mesh batching → OpenGL: draws via
- Physics worlds → Jitter2: integrates physics
- Audio playback → OpenAL: plays through
- Scene and tree configs → Content configs: defines scene data
- Gameplay properties → Action dispatcher: invokes configured actions
