# gsk-git/ecrp_cpp architecture

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

- Interactive diagram: https://gitdiagram.com/gsk-git/ecrp_cpp
- Repository: https://github.com/gsk-git/ecrp_cpp

## Overview

ESRO is a C++ open-world 2D game. The documented gameplay centers on exploring a procedurally generated world; the sampled implementation shows chunk generation and lookup plus player animation, but not the game loop or most advertised systems. Paths for unsampled advertised capabilities are limited to the existing src/ directory, and their connections are omitted rather than inferred.

Main entry points: [`src/headers/chunkManager.hpp`](https://github.com/gsk-git/ecrp_cpp/blob/main/src/headers/chunkManager.hpp) (Chunk terrain), [`src/worldManager.cpp`](https://github.com/gsk-git/ecrp_cpp/blob/main/src/worldManager.cpp) (World streaming), [`src/main.cpp`](https://github.com/gsk-git/ecrp_cpp/blob/main/src/main.cpp) (Game startup), [`src/include/FastNoise/include/FastNoise/FastNoiseLite.h`](https://github.com/gsk-git/ecrp_cpp/blob/main/src/include/FastNoise/include/FastNoise/FastNoiseLite.h) (Noise generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_game_entry["Game startup<br/>[main.cpp]"]
end

subgraph group_world["World generation"]
  node_world_manager["World streaming<br/>[worldManager.cpp]"]
  node_chunk["Chunk terrain<br/>[chunkManager.hpp]"]
  node_noise["Noise generation<br/>[FastNoiseLite.h]"]
  node_world_features["Climate and biomes"]
  node_environment["Environment management"]
end

subgraph group_actors["Player and society"]
  node_player["Player movement<br/>[playerManager.cpp]"]
  node_civilizations["Civilizations"]
  node_people_animals["People and animals"]
end

subgraph group_guidance["Player guidance"]
  node_ai_guide["AI guide"]
end

node_explorer(("Scientist player"))

node_world_manager -->|"generates and draws"| node_chunk
node_chunk -->|"samples noise"| node_noise
node_explorer -.->|"starts game"| node_game_entry

click node_player "https://github.com/gsk-git/ecrp_cpp/blob/main/src/playerManager.cpp"
click node_world_manager "https://github.com/gsk-git/ecrp_cpp/blob/main/src/worldManager.cpp"
click node_chunk "https://github.com/gsk-git/ecrp_cpp/blob/main/src/headers/chunkManager.hpp"
click node_noise "https://github.com/gsk-git/ecrp_cpp/blob/main/src/include/FastNoise/include/FastNoise/FastNoiseLite.h"
click node_game_entry "https://github.com/gsk-git/ecrp_cpp/blob/main/src/main.cpp"
click node_world_features "https://github.com/gsk-git/ecrp_cpp/tree/main/src"
click node_civilizations "https://github.com/gsk-git/ecrp_cpp/tree/main/src"
click node_people_animals "https://github.com/gsk-git/ecrp_cpp/tree/main/src"
click node_environment "https://github.com/gsk-git/ecrp_cpp/tree/main/src"
click node_ai_guide "https://github.com/gsk-git/ecrp_cpp/tree/main/src"

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_game_entry toneBlue
class node_world_manager,node_chunk,node_noise,node_world_features,node_environment toneAmber
class node_player,node_civilizations,node_people_animals toneMint
class node_ai_guide toneRose
class node_explorer toneIndigo
```

## Components

### Game runtime

- [Game startup](https://github.com/gsk-git/ecrp_cpp/blob/main/src/main.cpp): `src/main.cpp`

### World generation

- [World streaming](https://github.com/gsk-git/ecrp_cpp/blob/main/src/worldManager.cpp): `src/worldManager.cpp`
- [Chunk terrain](https://github.com/gsk-git/ecrp_cpp/blob/main/src/headers/chunkManager.hpp): `src/headers/chunkManager.hpp`
- [Noise generation](https://github.com/gsk-git/ecrp_cpp/blob/main/src/include/FastNoise/include/FastNoise/FastNoiseLite.h): `src/include/FastNoise/include/FastNoise/FastNoiseLite.h`
- [Climate and biomes](https://github.com/gsk-git/ecrp_cpp/tree/main/src): `src`
- [Environment management](https://github.com/gsk-git/ecrp_cpp/tree/main/src): `src`

### Player and society

- [Player movement](https://github.com/gsk-git/ecrp_cpp/blob/main/src/playerManager.cpp): `src/playerManager.cpp`
- [Civilizations](https://github.com/gsk-git/ecrp_cpp/tree/main/src): `src`
- [People and animals](https://github.com/gsk-git/ecrp_cpp/tree/main/src): `src`

### Player guidance

- [AI guide](https://github.com/gsk-git/ecrp_cpp/tree/main/src): `src`

### Other components

- **Scientist player**

## Connections

- World streaming → Chunk terrain: generates and draws (evidence: `src/worldManager.cpp`)
- Chunk terrain → Noise generation: samples noise (evidence: `src/headers/chunkManager.hpp`)
- Scientist player → Game startup: starts game
