# danjfarrell/dungeon_2025 architecture

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

- Interactive diagram: https://gitdiagram.com/danjfarrell/dungeon_2025
- Repository: https://github.com/danjfarrell/dungeon_2025

## Overview

DUNGEON_AI is a turn-based dungeon game: the player issues keyboard actions, the game resolves movement and combat across turns and dungeon levels, and the result is rendered with a HUD and map views. The tree indicates additional systems for magic, items, enemies, and progression. The README offers no feature detail, and sampled source is limited, so the graph shows only observed calls and documented responsibilities; it omits uncertain wiring between game orchestration, rendering, and other subsystems.

Main entry points: [`src/systems/InputController.cpp`](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/InputController.cpp) (Input Controller), [`src/world/DungeonManager.h`](https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/DungeonManager.h) (Dungeon Levels), [`src/ecs/World.h`](https://github.com/danjfarrell/dungeon_2025/blob/main/src/ecs/World.h) (ECS World), [`src/main.cpp`](https://github.com/danjfarrell/dungeon_2025/blob/main/src/main.cpp) (Game Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Game Entry"]
  node_main["Game Entry<br/>[main.cpp]"]
  node_game["Game Runtime<br/>[Game.cpp]"]
end

subgraph group_world["Dungeon World"]
  node_world["ECS World<br/>[World.h]"]
  node_map["Dungeon Map<br/>[Map.h]"]
  node_generators["Map Generation<br/>[MapGenerators.h]"]
  node_dungeons["Dungeon Levels<br/>[DungeonManager.h]"]
  node_cache[("Level Cache<br/>[LevelCache.h]")]
  node_spawner["Enemy Spawning<br/>[EnemySpawner.h]"]
end

subgraph group_play["Turn Gameplay"]
  node_input["Input Controller"]
  node_turns["Turn Manager<br/>[TurnManager.h]"]
  node_combat["Combat System<br/>[CombatSystem.h]"]
  node_magic["Magic System<br/>[MagicSystem.h]"]
  node_stairs["Stair Navigation<br/>[StairSystem.h]"]
  node_consumables["Consumables<br/>[ConsumableSystem.h]"]
  node_ai["Enemy AI<br/>[AISystem.h]"]
  node_progression["Experience<br/>[ExperienceSystem.h]"]
end

subgraph group_view["Presentation"]
  node_render["Game Rendering<br/>[RenderSystem.cpp]"]
  node_maprender["Map Rendering"]
  node_hud["HUD<br/>[HudRenderer.cpp]"]
  node_inventory["Inventory UI<br/>[InventoryUI.h]"]
  node_minimap["Minimap<br/>[Minimap.h]"]
  node_sprites["Sprite Assets<br/>[SpriteManager.h]"]
end

node_player(("Player"))

node_player -->|"starts game"| node_main
node_main -->|"initializes and runs"| node_game
node_input -->|"reads player state"| node_world
node_input -->|"checks tiles"| node_map
node_input -->|"coordinates turns"| node_turns
node_input -->|"requests attacks"| node_combat
node_input -->|"requests stair travel"| node_stairs
node_input -->|"uses inventory item"| node_consumables
node_input -->|"updates view"| node_minimap
node_dungeons -->|"reads and saves levels"| node_cache
node_dungeons -->|"selects current map"| node_map
node_dungeons -->|"generates levels"| node_generators
node_dungeons -->|"spawns enemies"| node_spawner
node_dungeons -->|"adds enemies"| node_world
node_turns -->|"processes components"| node_world

click node_main "https://github.com/danjfarrell/dungeon_2025/blob/main/src/main.cpp"
click node_game "https://github.com/danjfarrell/dungeon_2025/blob/main/src/core/Game.cpp"
click node_world "https://github.com/danjfarrell/dungeon_2025/blob/main/src/ecs/World.h"
click node_map "https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/Map.h"
click node_generators "https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/MapGenerators.h"
click node_dungeons "https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/DungeonManager.h"
click node_cache "https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/LevelCache.h"
click node_spawner "https://github.com/danjfarrell/dungeon_2025/blob/main/src/spawning/EnemySpawner.h"
click node_input "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/InputController.cpp"
click node_turns "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/TurnManager.h"
click node_combat "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/CombatSystem.h"
click node_magic "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/MagicSystem.h"
click node_stairs "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/StairSystem.h"
click node_consumables "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/ConsumableSystem.h"
click node_ai "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/AISystem.h"
click node_progression "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/ExperienceSystem.h"
click node_render "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/RenderSystem.cpp"
click node_maprender "https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/MapRenderSystem.cpp"
click node_hud "https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/HudRenderer.cpp"
click node_inventory "https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/InventoryUI.h"
click node_minimap "https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/Minimap.h"
click node_sprites "https://github.com/danjfarrell/dungeon_2025/blob/main/src/graphics/SpriteManager.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_main,node_game toneBlue
class node_world,node_map,node_generators,node_dungeons,node_cache,node_spawner toneAmber
class node_input,node_turns,node_combat,node_magic,node_stairs,node_consumables,node_ai,node_progression toneMint
class node_render,node_maprender,node_hud,node_inventory,node_minimap,node_sprites toneRose
class node_player toneIndigo
```

## Components

### Game Entry

- [Game Entry](https://github.com/danjfarrell/dungeon_2025/blob/main/src/main.cpp): `src/main.cpp`
- [Game Runtime](https://github.com/danjfarrell/dungeon_2025/blob/main/src/core/Game.cpp): `src/core/Game.cpp`

### Dungeon World

- [ECS World](https://github.com/danjfarrell/dungeon_2025/blob/main/src/ecs/World.h): `src/ecs/World.h`
- [Dungeon Map](https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/Map.h): `src/world/Map.h`
- [Map Generation](https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/MapGenerators.h): `src/world/MapGenerators.h`
- [Dungeon Levels](https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/DungeonManager.h): `src/world/DungeonManager.h`
- [Level Cache](https://github.com/danjfarrell/dungeon_2025/blob/main/src/world/LevelCache.h): `src/world/LevelCache.h`
- [Enemy Spawning](https://github.com/danjfarrell/dungeon_2025/blob/main/src/spawning/EnemySpawner.h): `src/spawning/EnemySpawner.h`

### Turn Gameplay

- [Input Controller](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/InputController.cpp): `src/systems/InputController.cpp`
- [Turn Manager](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/TurnManager.h): `src/systems/TurnManager.h`
- [Combat System](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/CombatSystem.h): `src/systems/CombatSystem.h`
- [Magic System](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/MagicSystem.h): `src/systems/MagicSystem.h`
- [Stair Navigation](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/StairSystem.h): `src/systems/StairSystem.h`
- [Consumables](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/ConsumableSystem.h): `src/systems/ConsumableSystem.h`
- [Enemy AI](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/AISystem.h): `src/systems/AISystem.h`
- [Experience](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/ExperienceSystem.h): `src/systems/ExperienceSystem.h`

### Presentation

- [Game Rendering](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/RenderSystem.cpp): `src/systems/RenderSystem.cpp`
- [Map Rendering](https://github.com/danjfarrell/dungeon_2025/blob/main/src/systems/MapRenderSystem.cpp): `src/systems/MapRenderSystem.cpp`
- [HUD](https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/HudRenderer.cpp): `src/ui/HudRenderer.cpp`
- [Inventory UI](https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/InventoryUI.h): `src/ui/InventoryUI.h`
- [Minimap](https://github.com/danjfarrell/dungeon_2025/blob/main/src/ui/Minimap.h): `src/ui/Minimap.h`
- [Sprite Assets](https://github.com/danjfarrell/dungeon_2025/blob/main/src/graphics/SpriteManager.h): `src/graphics/SpriteManager.h`

### Other components

- **Player**

## Connections

- Player → Game Entry: starts game
- Game Entry → Game Runtime: initializes and runs
- Input Controller → ECS World: reads player state
- Input Controller → Dungeon Map: checks tiles
- Input Controller → Turn Manager: coordinates turns
- Input Controller → Combat System: requests attacks
- Input Controller → Stair Navigation: requests stair travel
- Input Controller → Consumables: uses inventory item
- Input Controller → Minimap: updates view
- Dungeon Levels → Level Cache: reads and saves levels
- Dungeon Levels → Dungeon Map: selects current map
- Dungeon Levels → Map Generation: generates levels
- Dungeon Levels → Enemy Spawning: spawns enemies
- Dungeon Levels → ECS World: adds enemies
- Turn Manager → ECS World: processes components
