# typeguja/alkash3d-engine architecture

> Architecture diagram of the GitHub repository typeguja/alkash3d-engine, 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/typeguja/alkash3d-engine
- Repository: https://github.com/typeguja/alkash3d-engine

## Overview

AlKAsH3D is a Windows-focused Rust game engine for open-world simulation, accompanied by a standalone scene editor and runtime plugins. The principal runtime path is engine startup and scene/world loading, followed by simulation and rendering; the editor offers a parallel authoring path that imports or edits assets and presents them in a GPU viewport. The README documents the major engine capabilities and plugin roles; sampled source supports selected editor and DirectX 12 internals. Unsampled connections are omitted rather than inferred from module names.

Main entry points: [`alkash3d-rust/src/lib.rs`](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/lib.rs) (Engine Runtime), [`alkash3d-editorapp/src/app.rs`](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/app.rs) (Editor Application), [`alkash3d-rust/src/engine`](https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-rust/src/engine) (Render Passes), [`alkash3d-rust/src/plugin/manager.rs`](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/plugin/manager.rs) (Plugin Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_engine["Engine Runtime"]
  node_runtime["Engine Runtime<br/>[lib.rs]"]
  node_scene["ECS Scene<br/>[scene.rs]"]
  node_world["World Streaming<br/>[world_streaming.rs]"]
  node_physics["Car and Physics<br/>[car_physics.rs]"]
  node_scheduler["Task Scheduler"]
  node_audio["Audio<br/>[audio.rs]"]
  node_scripting["Scripting<br/>[scripting.rs]"]
  node_execfile["Standalone OBJ Viewer<br/>[main.rs]"]
end

subgraph group_rendering["Rendering"]
  node_render["DirectX Renderer<br/>[render.rs]"]
  node_pipelines["Render Passes"]
  node_shader["Shader Compilation<br/>[shader.rs]"]
  node_buffers["GPU Buffers<br/>[buffer.rs]"]
  node_descriptors["Descriptor Heaps<br/>[heap.rs]"]
  node_constantbuffer["Constant Buffers<br/>[constant_buffer.rs]"]
end

subgraph group_plugins["Runtime Plugins"]
  node_pluginmanager["Plugin Manager<br/>[manager.rs]"]
  node_inertial["Inertial Physics Plugin<br/>[lib.rs]"]
  node_firstfires["FirstFires Culling<br/>[lib.rs]"]
  node_lua["Lua Plugin<br/>[lib.rs]"]
end

subgraph group_editor["Editor"]
  node_editorentry["Editor Startup<br/>[main.rs]"]
  node_editorapp["Editor Application<br/>[app.rs]"]
  node_editormesh["Mesh Editing<br/>[mesh_edit.rs]"]
  node_editorui["Editor Panels"]
  node_editorgpu["Editor GPU Renderer<br/>[renderer.rs]"]
  node_editorpipeline["Editor Pipelines<br/>[pipeline.rs]"]
end

subgraph group_formats["Assets and Formats"]
  node_converters["Format Converters"]
  node_engineformats["Engine File Formats<br/>[altex_format.rs]"]
end

node_user(("Player or Developer"))

node_user -->|"runs"| node_runtime
node_runtime -->|"maintains"| node_scene
node_runtime -->|"streams worlds"| node_world
node_runtime -->|"simulates"| node_physics
node_runtime -->|"schedules tasks"| node_scheduler
node_runtime -->|"plays audio"| node_audio
node_runtime -->|"runs scripts"| node_scripting
node_runtime -->|"loads plugins"| node_pluginmanager
node_pluginmanager -->|"loads physics"| node_inertial
node_pluginmanager -->|"loads culling"| node_firstfires
node_pluginmanager -->|"loads scripting"| node_lua
node_runtime -->|"renders frames"| node_render
node_render -->|"uses passes"| node_pipelines
node_pipelines -->|"compiles shaders"| node_shader
node_render -->|"uses buffers"| node_buffers
node_pipelines -->|"creates descriptors"| node_descriptors
node_pipelines -->|"uses constants"| node_constantbuffer
node_user -->|"starts editor"| node_editorentry
node_editorentry -->|"creates app"| node_editorapp
node_editorapp -->|"presents panels"| node_editorui
node_editorapp -->|"edits meshes"| node_editormesh
node_editorapp -->|"renders viewport"| node_editorgpu
node_editorgpu -.->|"uses pipeline"| node_editorpipeline
node_editorapp -->|"imports and exports"| node_converters
node_converters -->|"handles native formats"| node_engineformats
node_user -->|"opens OBJ viewer"| node_execfile
node_execfile -->|"uses C ABI"| node_runtime

click node_runtime "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/lib.rs"
click node_scene "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/scene.rs"
click node_world "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/engine/world_streaming.rs"
click node_physics "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/car_physics.rs"
click node_scheduler "https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-rust/src/scheduler"
click node_audio "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/audio.rs"
click node_scripting "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/engine/scripting.rs"
click node_pluginmanager "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/plugin/manager.rs"
click node_inertial "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-inertial/src/lib.rs"
click node_firstfires "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-FirstFires/src/lib.rs"
click node_lua "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-luascript/src/lib.rs"
click node_render "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/render.rs"
click node_pipelines "https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-rust/src/engine"
click node_shader "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/shader.rs"
click node_buffers "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/buffer.rs"
click node_descriptors "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/heap.rs"
click node_constantbuffer "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/constant_buffer.rs"
click node_editorentry "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/main.rs"
click node_editorapp "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/app.rs"
click node_editormesh "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/editor/mesh_edit.rs"
click node_editorui "https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-editorapp/src/ui"
click node_editorgpu "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/gpu/renderer.rs"
click node_editorpipeline "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/gpu/pipeline.rs"
click node_converters "https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-editorapp/src/converters"
click node_engineformats "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/altex_format.rs"
click node_execfile "https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-execfile/src/main.rs"

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_runtime,node_scene,node_world,node_physics,node_scheduler,node_audio,node_scripting,node_execfile toneBlue
class node_render,node_pipelines,node_shader,node_buffers,node_descriptors,node_constantbuffer toneAmber
class node_pluginmanager,node_inertial,node_firstfires,node_lua toneMint
class node_editorentry,node_editorapp,node_editormesh,node_editorui,node_editorgpu,node_editorpipeline toneRose
class node_converters,node_engineformats,node_user toneIndigo
```

## Components

### Engine Runtime

- [Engine Runtime](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/lib.rs): `alkash3d-rust/src/lib.rs`
- [ECS Scene](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/scene.rs): `alkash3d-rust/src/scene.rs`
- [World Streaming](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/engine/world_streaming.rs): `alkash3d-rust/src/engine/world_streaming.rs`
- [Car and Physics](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/car_physics.rs): `alkash3d-rust/src/car_physics.rs`
- [Task Scheduler](https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-rust/src/scheduler): `alkash3d-rust/src/scheduler`
- [Audio](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/audio.rs): `alkash3d-rust/src/audio.rs`
- [Scripting](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/engine/scripting.rs): `alkash3d-rust/src/engine/scripting.rs`
- [Standalone OBJ Viewer](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-execfile/src/main.rs): `alkash3d-execfile/src/main.rs`

### Rendering

- [DirectX Renderer](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/render.rs): `alkash3d-rust/src/render.rs`
- [Render Passes](https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-rust/src/engine): `alkash3d-rust/src/engine`
- [Shader Compilation](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/shader.rs): `alkash3d-rust/src/shader.rs`
- [GPU Buffers](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/buffer.rs): `alkash3d-rust/src/buffer.rs`
- [Descriptor Heaps](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/heap.rs): `alkash3d-rust/src/heap.rs`
- [Constant Buffers](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/constant_buffer.rs): `alkash3d-rust/src/constant_buffer.rs`

### Runtime Plugins

- [Plugin Manager](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/plugin/manager.rs): `alkash3d-rust/src/plugin/manager.rs`
- [Inertial Physics Plugin](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-inertial/src/lib.rs): `alkash3d-inertial/src/lib.rs`
- [FirstFires Culling](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-FirstFires/src/lib.rs): `alkash3d-FirstFires/src/lib.rs`
- [Lua Plugin](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-luascript/src/lib.rs): `alkash3d-luascript/src/lib.rs`

### Editor

- [Editor Startup](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/main.rs): `alkash3d-editorapp/src/main.rs`
- [Editor Application](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/app.rs): `alkash3d-editorapp/src/app.rs`
- [Mesh Editing](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/editor/mesh_edit.rs): `alkash3d-editorapp/src/editor/mesh_edit.rs`
- [Editor Panels](https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-editorapp/src/ui): `alkash3d-editorapp/src/ui`
- [Editor GPU Renderer](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/gpu/renderer.rs): `alkash3d-editorapp/src/gpu/renderer.rs`
- [Editor Pipelines](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-editorapp/src/gpu/pipeline.rs): `alkash3d-editorapp/src/gpu/pipeline.rs`

### Assets and Formats

- [Format Converters](https://github.com/typeguja/alkash3d-engine/tree/main/alkash3d-editorapp/src/converters): `alkash3d-editorapp/src/converters`
- [Engine File Formats](https://github.com/typeguja/alkash3d-engine/blob/main/alkash3d-rust/src/altex_format.rs): `alkash3d-rust/src/altex_format.rs`

### Other components

- **Player or Developer**

## Connections

- Player or Developer → Engine Runtime: runs
- Engine Runtime → ECS Scene: maintains (evidence: `alkash3d-rust/src/lib.rs`)
- Engine Runtime → World Streaming: streams worlds
- Engine Runtime → Car and Physics: simulates (evidence: `alkash3d-rust/src/lib.rs`)
- Engine Runtime → Task Scheduler: schedules tasks (evidence: `alkash3d-rust/src/lib.rs`)
- Engine Runtime → Audio: plays audio (evidence: `alkash3d-rust/src/lib.rs`)
- Engine Runtime → Scripting: runs scripts
- Engine Runtime → Plugin Manager: loads plugins
- Plugin Manager → Inertial Physics Plugin: loads physics
- Plugin Manager → FirstFires Culling: loads culling
- Plugin Manager → Lua Plugin: loads scripting
- Engine Runtime → DirectX Renderer: renders frames (evidence: `alkash3d-rust/src/lib.rs`)
- DirectX Renderer → Render Passes: uses passes (evidence: `alkash3d-rust/src/engine/pipeline_shadow.rs`)
- Render Passes → Shader Compilation: compiles shaders (evidence: `alkash3d-rust/src/engine/pipeline_shadow.rs`)
- DirectX Renderer → GPU Buffers: uses buffers (evidence: `alkash3d-rust/src/render.rs`)
- Render Passes → Descriptor Heaps: creates descriptors (evidence: `alkash3d-rust/src/engine/pipeline_shadow.rs`)
- Render Passes → Constant Buffers: uses constants (evidence: `alkash3d-rust/src/engine/pipeline_shadow.rs`)
- Player or Developer → Editor Startup: starts editor (evidence: `alkash3d-editorapp/src/main.rs`)
- Editor Startup → Editor Application: creates app (evidence: `alkash3d-editorapp/src/main.rs`)
- Editor Application → Editor Panels: presents panels (evidence: `alkash3d-editorapp/src/app.rs`)
- Editor Application → Mesh Editing: edits meshes (evidence: `alkash3d-editorapp/src/app.rs`)
- Editor Application → Editor GPU Renderer: renders viewport (evidence: `alkash3d-editorapp/src/app.rs`)
- Editor GPU Renderer → Editor Pipelines: uses pipeline
- Editor Application → Format Converters: imports and exports (evidence: `alkash3d-editorapp/src/app.rs`)
- Format Converters → Engine File Formats: handles native formats
- Player or Developer → Standalone OBJ Viewer: opens OBJ viewer
- Standalone OBJ Viewer → Engine Runtime: uses C ABI
