# ygni-rtype/gengine architecture

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

- Interactive diagram: https://gitdiagram.com/ygni-rtype/gengine
- Repository: https://github.com/ygni-rtype/gengine

## Overview

GEngine is a C++ game-engine library built around an ECS, with local/remote engine instances and subsystems for simulation, rendering/input, GUI, audio, and networking. A typical application initializes the singleton, registers its components and systems, then runs engine event processing; networked builds additionally use client/server systems for commands, state updates, recording, and voice. The README describes package installation rather than runtime behavior. Several subsystem links are omitted because their implementations were not sampled.

Main entry points: [`include/ecs/ECS.hpp`](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/ECS.hpp) (ECS runtime), [`include/GEngine/GEngine.hpp`](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/GEngine.hpp) (GEngine singleton), [`include/GEngine/BaseEngine.hpp`](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/BaseEngine.hpp) (BaseEngine), [`include/ecs/system/Manager.hpp`](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/system/Manager.hpp) (System manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Engine and ECS"]
  node_singleton["GEngine singleton<br/>[GEngine.hpp]"]
  node_base["BaseEngine<br/>[BaseEngine.hpp]"]
  node_ecs["ECS runtime<br/>[ECS.hpp]"]
  node_entities["Entity manager<br/>[Manager.hpp]"]
  node_components["Component manager<br/>[Manager.hpp]"]
  node_systems["System manager<br/>[Manager.hpp]"]
  node_events["Event bus<br/>[Bus.hpp]"]
  node_registration["Component and system registration<br/>[GEngine.hpp]"]
end

subgraph group_game["Game and interface"]
  node_gameplay["Game simulation<br/>[Motions.hpp]"]
  node_collision["Collision handling<br/>[Collisions.hpp]"]
  node_remote["Local/remote interface<br/>[RemoteLocal.hpp]"]
end

subgraph group_driver["Driver and presentation"]
  node_gui["GUI scenes and widgets<br/>[SceneManager.hpp]"]
  node_input["Input capture"]
  node_render["Rendering and assets<br/>[RenderWindow.hpp]"]
  node_audio["Audio and voice<br/>[AudioManager.hpp]"]
end

subgraph group_network["Networking"]
  node_network_interface["Network interface systems<br/>[ClientServer.hpp]"]
  node_network_stack["Network transport<br/>[net.hpp]"]
  node_commands["Network commands<br/>[CommandManager.hpp]"]
  node_state_sync["Snapshots and updates<br/>[Snapshot.hpp]"]
  node_recording["Network recording<br/>[RecordManager.hpp]"]
end

node_app(("Game application"))
node_peers(("Network peers"))

node_app -->|"initializes"| node_singleton
node_singleton -->|"creates instances"| node_base
node_singleton -->|"registers elements"| node_registration
node_registration -->|"registers with"| node_base
node_base -->|"publishes and executes events"| node_ecs
node_ecs -->|"manages entities"| node_entities
node_ecs -->|"manages components"| node_components
node_ecs -->|"dispatches systems"| node_systems
node_systems -->|"uses event bus"| node_events
node_commands -->|"reads and sends messages"| node_network_stack
node_peers -->|"exchange messages"| node_network_stack

click node_singleton "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/GEngine.hpp"
click node_base "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/BaseEngine.hpp"
click node_ecs "https://github.com/ygni-rtype/gengine/blob/main/include/ecs/ECS.hpp"
click node_entities "https://github.com/ygni-rtype/gengine/blob/main/include/ecs/entity/Manager.hpp"
click node_components "https://github.com/ygni-rtype/gengine/blob/main/include/ecs/component/Manager.hpp"
click node_systems "https://github.com/ygni-rtype/gengine/blob/main/include/ecs/system/Manager.hpp"
click node_events "https://github.com/ygni-rtype/gengine/blob/main/include/ecs/system/event/Bus.hpp"
click node_registration "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/GEngine.hpp"
click node_gameplay "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/Motions.hpp"
click node_collision "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/Collisions.hpp"
click node_remote "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/systems/RemoteLocal.hpp"
click node_gui "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/gui/SceneManager.hpp"
click node_input "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/input/KeyboardCatcher.hpp"
click node_render "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/output/RenderWindow.hpp"
click node_audio "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/output/AudioManager.hpp"
click node_network_interface "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/ClientServer.hpp"
click node_network_stack "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/net/net.hpp"
click node_commands "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/CommandManager.hpp"
click node_state_sync "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/Snapshot.hpp"
click node_recording "https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/RecordManager.hpp"

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_singleton,node_base,node_ecs,node_entities,node_components,node_systems,node_events,node_registration toneBlue
class node_gameplay,node_collision,node_remote toneAmber
class node_gui,node_input,node_render,node_audio toneMint
class node_network_interface,node_network_stack,node_commands,node_state_sync,node_recording toneRose
class node_app,node_peers toneIndigo
```

## Components

### Engine and ECS

- [GEngine singleton](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/GEngine.hpp): `include/GEngine/GEngine.hpp`
- [BaseEngine](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/BaseEngine.hpp): `include/GEngine/BaseEngine.hpp`
- [ECS runtime](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/ECS.hpp): `include/ecs/ECS.hpp`
- [Entity manager](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/entity/Manager.hpp): `include/ecs/entity/Manager.hpp`
- [Component manager](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/component/Manager.hpp): `include/ecs/component/Manager.hpp`
- [System manager](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/system/Manager.hpp): `include/ecs/system/Manager.hpp`
- [Event bus](https://github.com/ygni-rtype/gengine/blob/main/include/ecs/system/event/Bus.hpp): `include/ecs/system/event/Bus.hpp`
- [Component and system registration](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/GEngine.hpp): `include/GEngine/GEngine.hpp`

### Game and interface

- [Game simulation](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/Motions.hpp): `include/GEngine/libdev/systems/Motions.hpp`
- [Collision handling](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/Collisions.hpp): `include/GEngine/libdev/systems/Collisions.hpp`
- [Local/remote interface](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/systems/RemoteLocal.hpp): `include/GEngine/interface/systems/RemoteLocal.hpp`

### Driver and presentation

- [GUI scenes and widgets](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/gui/SceneManager.hpp): `include/GEngine/libdev/systems/gui/SceneManager.hpp`
- [Input capture](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/input/KeyboardCatcher.hpp): `include/GEngine/libdev/systems/driver/input/KeyboardCatcher.hpp`
- [Rendering and assets](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/output/RenderWindow.hpp): `include/GEngine/libdev/systems/driver/output/RenderWindow.hpp`
- [Audio and voice](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/libdev/systems/driver/output/AudioManager.hpp): `include/GEngine/libdev/systems/driver/output/AudioManager.hpp`

### Networking

- [Network interface systems](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/ClientServer.hpp): `include/GEngine/interface/network/systems/ClientServer.hpp`
- [Network transport](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/net/net.hpp): `include/GEngine/net/net.hpp`
- [Network commands](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/CommandManager.hpp): `include/GEngine/interface/network/systems/CommandManager.hpp`
- [Snapshots and updates](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/Snapshot.hpp): `include/GEngine/interface/network/systems/Snapshot.hpp`
- [Network recording](https://github.com/ygni-rtype/gengine/blob/main/include/GEngine/interface/network/systems/RecordManager.hpp): `include/GEngine/interface/network/systems/RecordManager.hpp`

### Other components

- **Game application**
- **Network peers**

## Connections

- Game application → GEngine singleton: initializes
- GEngine singleton → BaseEngine: creates instances
- GEngine singleton → Component and system registration: registers elements
- Component and system registration → BaseEngine: registers with
- BaseEngine → ECS runtime: publishes and executes events
- ECS runtime → Entity manager: manages entities
- ECS runtime → Component manager: manages components
- ECS runtime → System manager: dispatches systems
- System manager → Event bus: uses event bus
- Network commands → Network transport: reads and sends messages
- Network peers → Network transport: exchange messages
