# maurycyliebner/ezeus architecture

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

## Overview

eZeus is a playable city-building strategy game implementing Zeus: Master of Olympus and its Poseidon expansion. The player starts and manages an adventure, develops a city through buildings, workers, and resource movement, and responds to events, military threats, and divine or heroic activity; the game also supports building two cities at once. The map reflects the runtime areas evident in the tree and the README’s major capabilities. Source excerpts are limited, so links between unsampled subsystems are omitted rather than inferred as a detailed call sequence.

Main entry points: [`emainwindow.cpp`](https://github.com/maurycyliebner/ezeus/blob/main/emainwindow.cpp) (Main Window), [`engine/egameboard.cpp`](https://github.com/maurycyliebner/ezeus/blob/main/engine/egameboard.cpp) (Game Board), [`main.cpp`](https://github.com/maurycyliebner/ezeus/blob/main/main.cpp) (Game Entry), [`characters/echaracter.cpp`](https://github.com/maurycyliebner/ezeus/blob/main/characters/echaracter.cpp) (Characters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Game Interface"]
  node_main["Game Entry<br/>[main.cpp]"]
  node_window["Main Window<br/>[emainwindow.cpp]"]
  node_settings["Settings<br/>[esettings.cpp]"]
  node_buildinginfo["Building Controls"]
  node_citydata["City Data View"]
end

subgraph group_simulation["World Simulation"]
  node_campaign["Campaigns<br/>[ecampaign.cpp]"]
  node_board["Game Board<br/>[egameboard.cpp]"]
  node_world["World Map<br/>[eworldboard.cpp]"]
  node_events["Game Events<br/>[egameevents.cpp]"]
end

subgraph group_city["City Development"]
  node_buildings["Buildings<br/>[ebuilding.cpp]"]
  node_storage["Resource Storage"]
  node_finances["City Finances<br/>[ecityfinances.cpp]"]
end

subgraph group_agents["People And Forces"]
  node_characters["Characters<br/>[echaracter.cpp]"]
  node_actions["Character Actions"]
  node_pathfinding["Pathfinding<br/>[epathfinder.cpp]"]
  node_gods["Gods And Heroes<br/>[egod.cpp]"]
  node_invasions["Invasions"]
end

subgraph group_presentation["Game Presentation"]
  node_buildingrender["Building Rendering"]
  node_terrain["Terrain And Tiles<br/>[eterrain.cpp]"]
  node_audio["Music And Sound<br/>[emusic.cpp]"]
end

node_player(("Player"))
node_originalfiles["Original Game Files"]
node_sdl["SDL Runtime"]

node_player -->|"plays"| node_window
node_main -->|"initializes"| node_window
node_main -->|"reads"| node_settings
node_main -->|"initializes"| node_audio
node_main -->|"initializes"| node_sdl
node_main -->|"checks files"| node_originalfiles
node_window -->|"starts adventures"| node_campaign
node_campaign -->|"configures play"| node_board
node_board -->|"simulates"| node_buildings
node_board -->|"simulates"| node_characters
node_board -->|"handles events"| node_events
node_board -->|"tracks cities"| node_world
node_characters -->|"performs"| node_actions
node_actions -->|"uses paths"| node_pathfinding
node_buildings -->|"stores resources"| node_storage
node_window -->|"shows controls"| node_buildinginfo
node_buildinginfo -->|"sets orders"| node_storage
node_window -->|"shows data"| node_citydata
node_citydata -->|"reads resources"| node_board
node_events -->|"handles threats"| node_invasions
node_characters -->|"includes"| node_gods
node_window -->|"presents city"| node_buildingrender
node_window -->|"presents map"| node_terrain
node_window -->|"plays audio"| node_audio

click node_main "https://github.com/maurycyliebner/ezeus/blob/main/main.cpp"
click node_window "https://github.com/maurycyliebner/ezeus/blob/main/emainwindow.cpp"
click node_settings "https://github.com/maurycyliebner/ezeus/blob/main/esettings.cpp"
click node_campaign "https://github.com/maurycyliebner/ezeus/blob/main/engine/ecampaign.cpp"
click node_board "https://github.com/maurycyliebner/ezeus/blob/main/engine/egameboard.cpp"
click node_world "https://github.com/maurycyliebner/ezeus/blob/main/engine/eworldboard.cpp"
click node_events "https://github.com/maurycyliebner/ezeus/blob/main/engine/egameevents.cpp"
click node_buildings "https://github.com/maurycyliebner/ezeus/blob/main/buildings/ebuilding.cpp"
click node_storage "https://github.com/maurycyliebner/ezeus/blob/main/buildings/estoragebuilding.cpp"
click node_finances "https://github.com/maurycyliebner/ezeus/blob/main/engine/boardData/ecityfinances.cpp"
click node_characters "https://github.com/maurycyliebner/ezeus/blob/main/characters/echaracter.cpp"
click node_actions "https://github.com/maurycyliebner/ezeus/blob/main/characters/actions/echaracteraction.cpp"
click node_pathfinding "https://github.com/maurycyliebner/ezeus/blob/main/engine/epathfinder.cpp"
click node_gods "https://github.com/maurycyliebner/ezeus/blob/main/characters/gods/egod.cpp"
click node_invasions "https://github.com/maurycyliebner/ezeus/blob/main/einvasionhandler.cpp"
click node_buildinginfo "https://github.com/maurycyliebner/ezeus/blob/main/widgets/infowidgets/estorageinfowidget.cpp"
click node_citydata "https://github.com/maurycyliebner/ezeus/blob/main/widgets/datawidgets/estoragedatawidget.cpp"
click node_buildingrender "https://github.com/maurycyliebner/ezeus/blob/main/buildings/ebuildingrenderer.cpp"
click node_terrain "https://github.com/maurycyliebner/ezeus/blob/main/engine/eterrain.cpp"
click node_audio "https://github.com/maurycyliebner/ezeus/blob/main/audio/emusic.cpp"

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_window,node_settings,node_buildinginfo,node_citydata toneBlue
class node_campaign,node_board,node_world,node_events toneAmber
class node_buildings,node_storage,node_finances toneMint
class node_characters,node_actions,node_pathfinding,node_gods,node_invasions toneRose
class node_buildingrender,node_terrain,node_audio,node_player,node_originalfiles,node_sdl toneIndigo
```

## Components

### Game Interface

- [Game Entry](https://github.com/maurycyliebner/ezeus/blob/main/main.cpp): `main.cpp`
- [Main Window](https://github.com/maurycyliebner/ezeus/blob/main/emainwindow.cpp): `emainwindow.cpp`
- [Settings](https://github.com/maurycyliebner/ezeus/blob/main/esettings.cpp): `esettings.cpp`
- [Building Controls](https://github.com/maurycyliebner/ezeus/blob/main/widgets/infowidgets/estorageinfowidget.cpp): `widgets/infowidgets/estorageinfowidget.cpp`
- [City Data View](https://github.com/maurycyliebner/ezeus/blob/main/widgets/datawidgets/estoragedatawidget.cpp): `widgets/datawidgets/estoragedatawidget.cpp`

### World Simulation

- [Campaigns](https://github.com/maurycyliebner/ezeus/blob/main/engine/ecampaign.cpp): `engine/ecampaign.cpp`
- [Game Board](https://github.com/maurycyliebner/ezeus/blob/main/engine/egameboard.cpp): `engine/egameboard.cpp`
- [World Map](https://github.com/maurycyliebner/ezeus/blob/main/engine/eworldboard.cpp): `engine/eworldboard.cpp`
- [Game Events](https://github.com/maurycyliebner/ezeus/blob/main/engine/egameevents.cpp): `engine/egameevents.cpp`

### City Development

- [Buildings](https://github.com/maurycyliebner/ezeus/blob/main/buildings/ebuilding.cpp): `buildings/ebuilding.cpp`
- [Resource Storage](https://github.com/maurycyliebner/ezeus/blob/main/buildings/estoragebuilding.cpp): `buildings/estoragebuilding.cpp`
- [City Finances](https://github.com/maurycyliebner/ezeus/blob/main/engine/boardData/ecityfinances.cpp): `engine/boardData/ecityfinances.cpp`

### People And Forces

- [Characters](https://github.com/maurycyliebner/ezeus/blob/main/characters/echaracter.cpp): `characters/echaracter.cpp`
- [Character Actions](https://github.com/maurycyliebner/ezeus/blob/main/characters/actions/echaracteraction.cpp): `characters/actions/echaracteraction.cpp`
- [Pathfinding](https://github.com/maurycyliebner/ezeus/blob/main/engine/epathfinder.cpp): `engine/epathfinder.cpp`
- [Gods And Heroes](https://github.com/maurycyliebner/ezeus/blob/main/characters/gods/egod.cpp): `characters/gods/egod.cpp`
- [Invasions](https://github.com/maurycyliebner/ezeus/blob/main/einvasionhandler.cpp): `einvasionhandler.cpp`

### Game Presentation

- [Building Rendering](https://github.com/maurycyliebner/ezeus/blob/main/buildings/ebuildingrenderer.cpp): `buildings/ebuildingrenderer.cpp`
- [Terrain And Tiles](https://github.com/maurycyliebner/ezeus/blob/main/engine/eterrain.cpp): `engine/eterrain.cpp`
- [Music And Sound](https://github.com/maurycyliebner/ezeus/blob/main/audio/emusic.cpp): `audio/emusic.cpp`

### Other components

- **Player**
- **Original Game Files**
- **SDL Runtime**

## Connections

- Player → Main Window: plays
- Game Entry → Main Window: initializes
- Game Entry → Settings: reads
- Game Entry → Music And Sound: initializes
- Game Entry → SDL Runtime: initializes
- Game Entry → Original Game Files: checks files
- Main Window → Campaigns: starts adventures
- Campaigns → Game Board: configures play
- Game Board → Buildings: simulates
- Game Board → Characters: simulates
- Game Board → Game Events: handles events
- Game Board → World Map: tracks cities
- Characters → Character Actions: performs
- Character Actions → Pathfinding: uses paths
- Buildings → Resource Storage: stores resources
- Main Window → Building Controls: shows controls
- Building Controls → Resource Storage: sets orders
- Main Window → City Data View: shows data
- City Data View → Game Board: reads resources
- Game Events → Invasions: handles threats
- Characters → Gods And Heroes: includes
- Main Window → Building Rendering: presents city
- Main Window → Terrain And Tiles: presents map
- Main Window → Music And Sound: plays audio
