# drept840-star/call-of-acaristan architecture

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

- Interactive diagram: https://gitdiagram.com/drept840-star/call-of-acaristan
- Repository: https://github.com/drept840-star/call-of-acaristan

## Overview

Call of Acaristan is a top-down action campaign game built on the in-house RPE6 engine, with 3D-rendered cutscenes and multiplayer support. The main player flow runs from application startup through mission play, where mission logic updates shared game state and entities; presentation includes the HUD, audio, and cutscenes, while campaign progress is saved. The graph also preserves the documented 2D/3D rendering and networking capabilities. Some subsystem internals were not sampled, so their connections are omitted where the evidence does not establish a caller.

Main entry points: [`src/app.py`](https://github.com/drept840-star/call-of-acaristan/blob/main/src/app.py) (Game application), [`src/missions`](https://github.com/drept840-star/call-of-acaristan/tree/main/src/missions) (Campaign missions), [`src/cutscenes/engine.py`](https://github.com/drept840-star/call-of-acaristan/blob/main/src/cutscenes/engine.py) (Cutscene engine), [`src/core/state.py`](https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/state.py) (Game state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Campaign gameplay"]
  node_app["Game application<br/>[app.py]"]
  node_missions["Campaign missions"]
  node_state["Game state<br/>[state.py]"]
  node_enemies["Enemy AI<br/>[enemy_ai.py]"]
  node_game_core["Game core<br/>[game_core.py]"]
end

subgraph group_engine["RPE6 engine"]
  node_engine_kernel["Engine kernel<br/>[app.py]"]
  node_config["Game configuration<br/>[config.py]"]
  node_renderer3d["3D renderer<br/>[core.py]"]
  node_render_bridge["3D game bridge<br/>[render3d_bridge.py]"]
end

subgraph group_presentation["Presentation"]
  node_hud["HUD<br/>[hud.py]"]
  node_cutscenes["Cutscene engine<br/>[engine.py]"]
  node_cast3d["3D cast<br/>[cast3d.py]"]
  node_audio["Game audio<br/>[audio.py]"]
  node_voice["Voice playback<br/>[voice.py]"]
end

subgraph group_persistence["Player data"]
  node_save[("Campaign saves<br/>[save_system.py]")]
end

subgraph group_multiplayer["Multiplayer"]
  node_multiplayer_ui["Multiplayer UI<br/>[mp.py]"]
  node_net_client["Network client<br/>[client.py]"]
  node_net_protocol["Network protocol<br/>[protocol.py]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_app
node_app -->|"uses core"| node_game_core
node_app -->|"loads config"| node_config
node_app -->|"uses state"| node_state
node_app -->|"loads and saves"| node_save
node_app -->|"uses HUD"| node_hud
node_app -->|"imports UI"| node_multiplayer_ui
node_app -->|"controls voice"| node_voice
node_missions -.->|"updates state"| node_state
node_missions -->|"uses AI"| node_enemies
node_missions -->|"saves progress"| node_save
node_missions -->|"uses HUD"| node_hud
node_missions -.->|"starts scenes"| node_cutscenes
node_cutscenes -->|"renders 3D"| node_render_bridge
node_cutscenes -->|"uses cast"| node_cast3d
node_render_bridge -->|"draws primitives"| node_renderer3d
node_enemies -->|"reads state"| node_state
node_app -.->|"boots runtime"| node_engine_kernel
node_net_client -->|"uses protocol"| node_net_protocol

click node_app "https://github.com/drept840-star/call-of-acaristan/blob/main/src/app.py"
click node_missions "https://github.com/drept840-star/call-of-acaristan/tree/main/src/missions"
click node_state "https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/state.py"
click node_enemies "https://github.com/drept840-star/call-of-acaristan/blob/main/src/entities/enemy_ai.py"
click node_game_core "https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/game_core.py"
click node_engine_kernel "https://github.com/drept840-star/call-of-acaristan/blob/main/src/engine/core/app.py"
click node_config "https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/config.py"
click node_renderer3d "https://github.com/drept840-star/call-of-acaristan/blob/main/src/engine3d/core.py"
click node_render_bridge "https://github.com/drept840-star/call-of-acaristan/blob/main/src/game/render3d_bridge.py"
click node_hud "https://github.com/drept840-star/call-of-acaristan/blob/main/src/ui/hud.py"
click node_cutscenes "https://github.com/drept840-star/call-of-acaristan/blob/main/src/cutscenes/engine.py"
click node_cast3d "https://github.com/drept840-star/call-of-acaristan/blob/main/src/cutscenes/cast3d.py"
click node_audio "https://github.com/drept840-star/call-of-acaristan/blob/main/src/audio/audio.py"
click node_voice "https://github.com/drept840-star/call-of-acaristan/blob/main/src/audio/voice.py"
click node_save "https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/save_system.py"
click node_multiplayer_ui "https://github.com/drept840-star/call-of-acaristan/blob/main/src/ui/mp.py"
click node_net_client "https://github.com/drept840-star/call-of-acaristan/blob/main/src/net/client.py"
click node_net_protocol "https://github.com/drept840-star/call-of-acaristan/blob/main/src/net/protocol.py"

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_missions,node_state,node_enemies,node_game_core toneBlue
class node_engine_kernel,node_config,node_renderer3d,node_render_bridge toneAmber
class node_hud,node_cutscenes,node_cast3d,node_audio,node_voice toneMint
class node_save toneRose
class node_multiplayer_ui,node_net_client,node_net_protocol,node_player toneIndigo
```

## Components

### Campaign gameplay

- [Game application](https://github.com/drept840-star/call-of-acaristan/blob/main/src/app.py): `src/app.py`
- [Campaign missions](https://github.com/drept840-star/call-of-acaristan/tree/main/src/missions): `src/missions`
- [Game state](https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/state.py): `src/core/state.py`
- [Enemy AI](https://github.com/drept840-star/call-of-acaristan/blob/main/src/entities/enemy_ai.py): `src/entities/enemy_ai.py`
- [Game core](https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/game_core.py): `src/core/game_core.py`

### RPE6 engine

- [Engine kernel](https://github.com/drept840-star/call-of-acaristan/blob/main/src/engine/core/app.py): `src/engine/core/app.py`
- [Game configuration](https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/config.py): `src/core/config.py`
- [3D renderer](https://github.com/drept840-star/call-of-acaristan/blob/main/src/engine3d/core.py): `src/engine3d/core.py`
- [3D game bridge](https://github.com/drept840-star/call-of-acaristan/blob/main/src/game/render3d_bridge.py): `src/game/render3d_bridge.py`

### Presentation

- [HUD](https://github.com/drept840-star/call-of-acaristan/blob/main/src/ui/hud.py): `src/ui/hud.py`
- [Cutscene engine](https://github.com/drept840-star/call-of-acaristan/blob/main/src/cutscenes/engine.py): `src/cutscenes/engine.py`
- [3D cast](https://github.com/drept840-star/call-of-acaristan/blob/main/src/cutscenes/cast3d.py): `src/cutscenes/cast3d.py`
- [Game audio](https://github.com/drept840-star/call-of-acaristan/blob/main/src/audio/audio.py): `src/audio/audio.py`
- [Voice playback](https://github.com/drept840-star/call-of-acaristan/blob/main/src/audio/voice.py): `src/audio/voice.py`

### Player data

- [Campaign saves](https://github.com/drept840-star/call-of-acaristan/blob/main/src/core/save_system.py): `src/core/save_system.py`

### Multiplayer

- [Multiplayer UI](https://github.com/drept840-star/call-of-acaristan/blob/main/src/ui/mp.py): `src/ui/mp.py`
- [Network client](https://github.com/drept840-star/call-of-acaristan/blob/main/src/net/client.py): `src/net/client.py`
- [Network protocol](https://github.com/drept840-star/call-of-acaristan/blob/main/src/net/protocol.py): `src/net/protocol.py`

### Other components

- **Player**

## Connections

- Player → Game application: starts game
- Game application → Game core: uses core (evidence: `src/app.py`)
- Game application → Game configuration: loads config (evidence: `src/app.py`)
- Game application → Game state: uses state (evidence: `src/app.py`)
- Game application → Campaign saves: loads and saves (evidence: `src/app.py`)
- Game application → HUD: uses HUD (evidence: `src/app.py`)
- Game application → Multiplayer UI: imports UI (evidence: `src/app.py`)
- Game application → Voice playback: controls voice (evidence: `src/app.py`)
- Campaign missions → Game state: updates state (evidence: `src/missions/m1/main.py`)
- Campaign missions → Enemy AI: uses AI (evidence: `src/missions/m1/main.py`)
- Campaign missions → Campaign saves: saves progress (evidence: `src/missions/m1/main.py`)
- Campaign missions → HUD: uses HUD (evidence: `src/missions/m1/main.py`)
- Campaign missions → Cutscene engine: starts scenes (evidence: `src/cutscenes/engine.py`)
- Cutscene engine → 3D game bridge: renders 3D
- Cutscene engine → 3D cast: uses cast (evidence: `src/cutscenes/cast3d.py`)
- 3D game bridge → 3D renderer: draws primitives (evidence: `src/game/render3d_bridge.py`)
- Enemy AI → Game state: reads state (evidence: `src/entities/enemy_ai.py`)
- Game application → Engine kernel: boots runtime
- Network client → Network protocol: uses protocol (evidence: `src/net/client.py`)
