# cepedf/hydroneer-releitura-2 architecture

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

- Interactive diagram: https://gitdiagram.com/cepedf/hydroneer-releitura-2
- Repository: https://github.com/cepedf/hydroneer-releitura-2

## Overview

Hydroneer 2 is a Godot first-person mining and factory-building game. The main loop takes the player from digging and washing ore through machine processing and selling, then uses earnings and missions to unlock new land and content. The README documents terrain, machinery, player, HUD, audio, and data modules, and assigns orchestration, economy, missions, events, saving, and the map to main.gd. Relationships below rely on the README; no source excerpts were provided.

Main entry points: [`scripts/main.gd`](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd) (Game Orchestration), [`scripts/machines.gd`](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/machines.gd) (Machines and Networks), [`scripts/player.gd`](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/player.gd) (First-Person Player), [`scripts/hud.gd`](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/hud.gd) (HUD and Menus)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["World and Player"]
  node_player["First-Person Player<br/>[player.gd]"]
  node_terrain["Terrain and Water<br/>[terrain.gd]"]
  node_main_scene["Game Scene<br/>[main.tscn]"]
end

subgraph group_industry["Mining Industry"]
  node_machines["Machines and Networks<br/>[machines.gd]"]
  node_ore_data["Ore and Gem Data<br/>[data.gd]"]
  node_processing["Smelting and Crafting<br/>[machines.gd]"]
end

subgraph group_progression["Progression and Economy"]
  node_sales["Sales and Orders<br/>[main.gd]"]
  node_missions["Missions and Zones<br/>[main.gd]"]
  node_village["Village and Legacy<br/>[main.gd]"]
  node_events["Events and Banking<br/>[main.gd]"]
  node_map["Map and Travel<br/>[hud.gd]"]
end

subgraph group_interface["Interface and Support"]
  node_orchestration["Game Orchestration<br/>[main.gd]"]
  node_hud["HUD and Menus<br/>[hud.gd]"]
  node_audio["Spatial Machine Audio<br/>[sound.gd]"]
  node_savefile[("Save Game")]
end

node_player_actor(("Player"))

node_player_actor -->|"controls"| node_player
node_player -->|"digs and washes"| node_terrain
node_player -->|"interacts"| node_machines
node_player -->|"sells ore"| node_sales
node_orchestration -->|"manages world"| node_terrain
node_orchestration -->|"orchestrates"| node_machines
node_machines -->|"uses balance data"| node_ore_data
node_machines -->|"runs conversions"| node_processing
node_orchestration -->|"handles economy"| node_sales
node_orchestration -->|"tracks progress"| node_missions
node_orchestration -->|"advances village"| node_village
node_orchestration -->|"runs events"| node_events
node_hud -->|"shows map"| node_map
node_orchestration -->|"drives interface"| node_hud
node_orchestration -->|"saves and loads"| node_savefile
node_machines -->|"machine sounds"| node_audio

click node_player "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/player.gd"
click node_terrain "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/terrain.gd"
click node_main_scene "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scenes/main.tscn"
click node_machines "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/machines.gd"
click node_ore_data "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/data.gd"
click node_processing "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/machines.gd"
click node_sales "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd"
click node_missions "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd"
click node_village "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd"
click node_events "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd"
click node_map "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/hud.gd"
click node_orchestration "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd"
click node_hud "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/hud.gd"
click node_audio "https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/sound.gd"

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_player,node_terrain,node_main_scene toneBlue
class node_machines,node_ore_data,node_processing toneAmber
class node_sales,node_missions,node_village,node_events,node_map toneMint
class node_orchestration,node_hud,node_audio,node_savefile toneRose
class node_player_actor toneIndigo
```

## Components

### World and Player

- [First-Person Player](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/player.gd): `scripts/player.gd`
- [Terrain and Water](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/terrain.gd): `scripts/terrain.gd`
- [Game Scene](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scenes/main.tscn): `scenes/main.tscn`

### Mining Industry

- [Machines and Networks](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/machines.gd): `scripts/machines.gd`
- [Ore and Gem Data](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/data.gd): `scripts/data.gd`
- [Smelting and Crafting](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/machines.gd): `scripts/machines.gd`

### Progression and Economy

- [Sales and Orders](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd): `scripts/main.gd`
- [Missions and Zones](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd): `scripts/main.gd`
- [Village and Legacy](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd): `scripts/main.gd`
- [Events and Banking](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd): `scripts/main.gd`
- [Map and Travel](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/hud.gd): `scripts/hud.gd`

### Interface and Support

- [Game Orchestration](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/main.gd): `scripts/main.gd`
- [HUD and Menus](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/hud.gd): `scripts/hud.gd`
- [Spatial Machine Audio](https://github.com/cepedf/hydroneer-releitura-2/blob/main/scripts/sound.gd): `scripts/sound.gd`
- **Save Game**

### Other components

- **Player**

## Connections

- Player → First-Person Player: controls (evidence: `README.md`)
- First-Person Player → Terrain and Water: digs and washes (evidence: `README.md`)
- First-Person Player → Machines and Networks: interacts (evidence: `README.md`)
- First-Person Player → Sales and Orders: sells ore (evidence: `README.md`)
- Game Orchestration → Terrain and Water: manages world (evidence: `README.md`)
- Game Orchestration → Machines and Networks: orchestrates (evidence: `README.md`)
- Machines and Networks → Ore and Gem Data: uses balance data (evidence: `README.md`)
- Machines and Networks → Smelting and Crafting: runs conversions (evidence: `README.md`)
- Game Orchestration → Sales and Orders: handles economy (evidence: `README.md`)
- Game Orchestration → Missions and Zones: tracks progress (evidence: `README.md`)
- Game Orchestration → Village and Legacy: advances village (evidence: `README.md`)
- Game Orchestration → Events and Banking: runs events (evidence: `README.md`)
- HUD and Menus → Map and Travel: shows map (evidence: `README.md`)
- Game Orchestration → HUD and Menus: drives interface (evidence: `README.md`)
- Game Orchestration → Save Game: saves and loads (evidence: `README.md`)
- Machines and Networks → Spatial Machine Audio: machine sounds (evidence: `README.md`)
