# daid/emptyepsilon architecture

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

- Interactive diagram: https://gitdiagram.com/daid/emptyepsilon
- Repository: https://github.com/daid/emptyepsilon
- Video tour (about a minute): https://gitdiagram.com/daid/emptyepsilon/video

## Overview

EmptyEpsilon is a multiplayer spaceship-bridge simulation: players select or join a ship, operate crew stations, and issue commands that affect the shared scenario. The repository also supports Game Master scenario control, AI factions, scripting, a ship database, and configurable lighting/hardware output. The graph follows documented capabilities and source-index relationships; unsampled implementation details are represented only at their supported directory paths, and uncertain wiring is omitted.

Main entry points: [`src/main.cpp`](https://github.com/daid/emptyepsilon/blob/master/src/main.cpp) (Game entry), [`src/components`](https://github.com/daid/emptyepsilon/tree/master/src/components) (Ship systems), [`src/screens/crew6/engineeringScreen.cpp`](https://github.com/daid/emptyepsilon/blob/master/src/screens/crew6/engineeringScreen.cpp) (Engineering station), [`src/menus`](https://github.com/daid/emptyepsilon/tree/master/src/menus) (Menus and selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_entry["Game entry<br/>[main.cpp]"]
  node_menus["Menus and selection"]
  node_preferences["Preferences"]
  node_rendering["Rendering resources<br/>[glObjects.h]"]
end

subgraph group_simulation["Simulation"]
  node_global["Scenario state<br/>[gameGlobalInfo.h]"]
  node_playerinfo["Player commands<br/>[playerInfo.h]"]
  node_shipcomponents["Ship systems"]
  node_systems["Simulation systems"]
  node_ai["Faction AI<br/>[ai.cpp]"]
  node_multiplayer["Multiplayer state"]
end

subgraph group_crew["Crew interfaces"]
  node_crewstations["Crew stations"]
  node_engineering["Engineering station"]
  node_screenparts["Station controls"]
  node_gui["GUI toolkit"]
  node_theme["GUI themes<br/>[theme.h]"]
end

subgraph group_extensions["Game extensions"]
  node_gm["Game Master"]
  node_scripting["Scenario scripting"]
  node_database["Ship database<br/>[databaseView.cpp]"]
  node_hardware["Hardware output"]
end

node_players(("Players"))

node_players -->|"start game"| node_entry
node_entry -->|"opens selection"| node_menus
node_entry -->|"initializes output"| node_hardware
node_entry -->|"loads settings"| node_preferences
node_menus -->|"reads scenario"| node_global
node_menus -->|"uses player state"| node_playerinfo
node_menus -->|"selects station"| node_crewstations
node_crewstations -.->|"issues commands"| node_playerinfo
node_engineering -->|"sets system requests"| node_playerinfo
node_engineering -->|"reads game settings"| node_global
node_engineering -->|"reads ship systems"| node_shipcomponents
node_engineering -->|"uses controls"| node_screenparts
node_crewstations -.->|"builds interfaces"| node_gui
node_gui -->|"reads styles"| node_theme
node_systems -.->|"updates components"| node_shipcomponents
node_ai -->|"reads ship state"| node_shipcomponents
node_ai -->|"uses jump system"| node_systems
node_database -->|"reads database entries"| node_shipcomponents
node_gm -.->|"controls scenario"| node_global
node_global -->|"runs scripts"| node_scripting
node_hardware -->|"reads ship values"| node_shipcomponents
node_entry -.->|"uses render resources"| node_rendering

click node_entry "https://github.com/daid/emptyepsilon/blob/master/src/main.cpp"
click node_menus "https://github.com/daid/emptyepsilon/tree/master/src/menus"
click node_preferences "https://github.com/daid/emptyepsilon/blob/master/src/preferenceManager.h"
click node_global "https://github.com/daid/emptyepsilon/blob/master/src/gameGlobalInfo.h"
click node_playerinfo "https://github.com/daid/emptyepsilon/blob/master/src/playerInfo.h"
click node_shipcomponents "https://github.com/daid/emptyepsilon/tree/master/src/components"
click node_systems "https://github.com/daid/emptyepsilon/tree/master/src/systems"
click node_ai "https://github.com/daid/emptyepsilon/blob/master/src/ai/ai.cpp"
click node_multiplayer "https://github.com/daid/emptyepsilon/tree/master/src/multiplayer"
click node_crewstations "https://github.com/daid/emptyepsilon/tree/master/src/screens"
click node_engineering "https://github.com/daid/emptyepsilon/blob/master/src/screens/crew6/engineeringScreen.cpp"
click node_screenparts "https://github.com/daid/emptyepsilon/tree/master/src/screenComponents"
click node_gui "https://github.com/daid/emptyepsilon/tree/master/src/gui"
click node_theme "https://github.com/daid/emptyepsilon/blob/master/src/gui/theme.h"
click node_gm "https://github.com/daid/emptyepsilon/tree/master/src/screens/gm"
click node_scripting "https://github.com/daid/emptyepsilon/tree/master/src/script"
click node_database "https://github.com/daid/emptyepsilon/blob/master/src/screenComponents/databaseView.cpp"
click node_hardware "https://github.com/daid/emptyepsilon/blob/master/src/hardware/hardwareController.cpp"
click node_rendering "https://github.com/daid/emptyepsilon/blob/master/src/glObjects.h"

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_entry,node_menus,node_preferences,node_rendering toneBlue
class node_global,node_playerinfo,node_shipcomponents,node_systems,node_ai,node_multiplayer toneAmber
class node_crewstations,node_engineering,node_screenparts,node_gui,node_theme toneMint
class node_gm,node_scripting,node_database,node_hardware toneRose
class node_players toneIndigo
```

## Components

### Game runtime

- [Game entry](https://github.com/daid/emptyepsilon/blob/master/src/main.cpp): `src/main.cpp`
- [Menus and selection](https://github.com/daid/emptyepsilon/tree/master/src/menus): `src/menus`
- [Preferences](https://github.com/daid/emptyepsilon/blob/master/src/preferenceManager.h): `src/preferenceManager.h`
- [Rendering resources](https://github.com/daid/emptyepsilon/blob/master/src/glObjects.h): `src/glObjects.h`

### Simulation

- [Scenario state](https://github.com/daid/emptyepsilon/blob/master/src/gameGlobalInfo.h): `src/gameGlobalInfo.h`
- [Player commands](https://github.com/daid/emptyepsilon/blob/master/src/playerInfo.h): `src/playerInfo.h`
- [Ship systems](https://github.com/daid/emptyepsilon/tree/master/src/components): `src/components`
- [Simulation systems](https://github.com/daid/emptyepsilon/tree/master/src/systems): `src/systems`
- [Faction AI](https://github.com/daid/emptyepsilon/blob/master/src/ai/ai.cpp): `src/ai/ai.cpp`
- [Multiplayer state](https://github.com/daid/emptyepsilon/tree/master/src/multiplayer): `src/multiplayer`

### Crew interfaces

- [Crew stations](https://github.com/daid/emptyepsilon/tree/master/src/screens): `src/screens`
- [Engineering station](https://github.com/daid/emptyepsilon/blob/master/src/screens/crew6/engineeringScreen.cpp): `src/screens/crew6/engineeringScreen.cpp`
- [Station controls](https://github.com/daid/emptyepsilon/tree/master/src/screenComponents): `src/screenComponents`
- [GUI toolkit](https://github.com/daid/emptyepsilon/tree/master/src/gui): `src/gui`
- [GUI themes](https://github.com/daid/emptyepsilon/blob/master/src/gui/theme.h): `src/gui/theme.h`

### Game extensions

- [Game Master](https://github.com/daid/emptyepsilon/tree/master/src/screens/gm): `src/screens/gm`
- [Scenario scripting](https://github.com/daid/emptyepsilon/tree/master/src/script): `src/script`
- [Ship database](https://github.com/daid/emptyepsilon/blob/master/src/screenComponents/databaseView.cpp): `src/screenComponents/databaseView.cpp`
- [Hardware output](https://github.com/daid/emptyepsilon/blob/master/src/hardware/hardwareController.cpp): `src/hardware/hardwareController.cpp`

### Other components

- **Players**

## Connections

- Players → Game entry: start game
- Game entry → Menus and selection: opens selection (evidence: `src/main.cpp`)
- Game entry → Hardware output: initializes output (evidence: `src/main.cpp`)
- Game entry → Preferences: loads settings (evidence: `src/main.cpp`)
- Menus and selection → Scenario state: reads scenario (evidence: `src/menus/shipSelectionScreen.cpp`)
- Menus and selection → Player commands: uses player state (evidence: `src/menus/shipSelectionScreen.cpp`)
- Menus and selection → Crew stations: selects station (evidence: `src/menus/shipSelectionScreen.cpp`)
- Crew stations → Player commands: issues commands (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- Engineering station → Player commands: sets system requests (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- Engineering station → Scenario state: reads game settings (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- Engineering station → Ship systems: reads ship systems (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- Engineering station → Station controls: uses controls (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- Crew stations → GUI toolkit: builds interfaces (evidence: `src/screens/crew6/engineeringScreen.cpp`)
- GUI toolkit → GUI themes: reads styles (evidence: `src/gui/theme.h`)
- Simulation systems → Ship systems: updates components (evidence: `src/systems/beamweapon.cpp`)
- Faction AI → Ship systems: reads ship state (evidence: `src/ai/ai.cpp`)
- Faction AI → Simulation systems: uses jump system (evidence: `src/ai/ai.cpp`)
- Ship database → Ship systems: reads database entries (evidence: `src/screenComponents/databaseView.cpp`)
- Game Master → Scenario state: controls scenario
- Scenario state → Scenario scripting: runs scripts (evidence: `src/gameGlobalInfo.h`)
- Hardware output → Ship systems: reads ship values (evidence: `src/hardware/hardwareController.cpp`)
- Game entry → Rendering resources: uses render resources (evidence: `src/main.cpp`)
