# nafiz-codes/peaks-of-eternal-light architecture

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

- Interactive diagram: https://gitdiagram.com/nafiz-codes/peaks-of-eternal-light
- Repository: https://github.com/nafiz-codes/peaks-of-eternal-light

## Overview

Peaks of Eternal Light is a Godot lunar exploration and mission-management game. Players launch through startup and landing-site selection, then manage a lunar outpost and its crew across a seven-sol campaign while balancing resources, construction, safety, and mission decisions. They can explore on foot and operate scheduled rover expeditions for surveys, sampling, and rescue. The graph preserves the README’s major gameplay capabilities and uses exact scene, script, and data paths from the tree. Source excerpts cover only data-preparation tools, not runtime wiring, so unverified runtime relationships are omitted or dashed.

Main entry points: [`src/world/rover_drive.gd`](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_drive.gd) (Rover Control), [`scenes/lunar_landing_selector.tscn`](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_landing_selector.tscn) (Landing Selection), [`scenes/lunar_outpost_3d.tscn`](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_outpost_3d.tscn) (Outpost World), [`scenes/startup.tscn`](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/startup.tscn) (Startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_journey["Campaign Journey"]
  node_startup["Startup<br/>[startup.tscn]"]
  node_landing["Landing Selection"]
  node_outpost["Outpost World"]
end

subgraph group_mission["Mission Systems"]
  node_mission_plan["Mission Planning"]
  node_planner["Mission Planner<br/>[mission_planner.gd]"]
  node_simulator["Mission Simulator"]
  node_mission_state["Mission State<br/>[mission_state.gd]"]
  node_construction["Construction Planning<br/>[construction.json]"]
  node_events["Mission Decisions<br/>[events.json]"]
  node_story["Campaign Story<br/>[story.gd]"]
end

subgraph group_explore["Surface Exploration"]
  node_expedition["Rover Expeditions"]
  node_expedition_scene["Expedition Scene"]
  node_rover_control["Rover Control<br/>[rover_drive.gd]"]
  node_scanner["Rover Scanner<br/>[rover_scanner.gd]"]
  node_sample_arm["Sample Arm"]
  node_terrain["Polar Terrain<br/>[polar_terrain.gd]"]
end

subgraph group_interface["Player Interface"]
  node_dashboard["Mission Dashboard"]
  node_dialogue["Crew Dialogue<br/>[crew_dialogue.gd]"]
  node_crew_activity["Crew Activities<br/>[crew_fieldwork.gd]"]
  node_ending["Mission Ending"]
end

subgraph group_runtime["Runtime Services"]
  node_session["Mission Session<br/>[mission_session.gd]"]
  node_saves["Mission Saves<br/>[mission_save.gd]"]
  node_settings["Game Settings<br/>[game_settings.gd]"]
  node_audio["Game Audio<br/>[game_audio.gd]"]
end

node_player(("Player"))

node_player -->|"launches"| node_startup
node_startup -->|"opens"| node_landing
node_player -->|"chooses site"| node_landing
node_landing -.->|"begins campaign"| node_outpost
node_player -.->|"plans construction"| node_mission_plan
node_mission_plan -.->|"configures"| node_planner
node_planner -.->|"simulates"| node_simulator
node_simulator -.->|"updates"| node_mission_state
node_player -->|"monitors resources"| node_dashboard
node_player -->|"resolves decisions"| node_events
node_events -.->|"shapes campaign"| node_story
node_player -->|"explores on foot"| node_outpost
node_player -->|"talks with crew"| node_dialogue
node_outpost -.->|"hosts activities"| node_crew_activity
node_player -->|"starts expedition"| node_expedition_scene
node_expedition_scene -.->|"runs objectives"| node_expedition
node_player -->|"drives rover"| node_rover_control
node_rover_control -.->|"scans targets"| node_scanner
node_rover_control -.->|"collects samples"| node_sample_arm
node_player -.->|"surveys surface"| node_terrain
node_player -->|"reviews outcome"| node_ending
node_player -->|"saves mission"| node_saves
node_player -->|"customizes settings"| node_settings
node_player -.->|"adjusts audio"| node_audio
node_session -.->|"persists progress"| node_saves

click node_startup "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/startup.tscn"
click node_landing "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_landing_selector.tscn"
click node_outpost "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_outpost_3d.tscn"
click node_mission_plan "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_planning.tscn"
click node_planner "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_planner.gd"
click node_simulator "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_simulator.gd"
click node_mission_state "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_state.gd"
click node_construction "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/Resources/construction.json"
click node_events "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/Resources/events.json"
click node_story "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/story.gd"
click node_expedition "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/rover_expedition.gd"
click node_expedition_scene "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/rover_expedition.tscn"
click node_rover_control "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_drive.gd"
click node_scanner "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_scanner.gd"
click node_sample_arm "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_sample_arm.gd"
click node_terrain "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/polar_terrain.gd"
click node_dashboard "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_dashboard.tscn"
click node_dialogue "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/ui/crew_dialogue.gd"
click node_crew_activity "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/crew_fieldwork.gd"
click node_ending "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_ending.tscn"
click node_session "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/mission_session.gd"
click node_saves "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/mission_save.gd"
click node_settings "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/game_settings.gd"
click node_audio "https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/game_audio.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_startup,node_landing,node_outpost toneBlue
class node_mission_plan,node_planner,node_simulator,node_mission_state,node_construction,node_events,node_story toneAmber
class node_expedition,node_expedition_scene,node_rover_control,node_scanner,node_sample_arm,node_terrain toneMint
class node_dashboard,node_dialogue,node_crew_activity,node_ending toneRose
class node_session,node_saves,node_settings,node_audio,node_player toneIndigo
```

## Components

### Campaign Journey

- [Startup](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/startup.tscn): `scenes/startup.tscn`
- [Landing Selection](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_landing_selector.tscn): `scenes/lunar_landing_selector.tscn`
- [Outpost World](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/lunar_outpost_3d.tscn): `scenes/lunar_outpost_3d.tscn`

### Mission Systems

- [Mission Planning](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_planning.tscn): `scenes/mission_planning.tscn`
- [Mission Planner](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_planner.gd): `src/simulation/mission_planner.gd`
- [Mission Simulator](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_simulator.gd): `src/simulation/mission_simulator.gd`
- [Mission State](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/mission_state.gd): `src/simulation/mission_state.gd`
- [Construction Planning](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/Resources/construction.json): `Resources/construction.json`
- [Mission Decisions](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/Resources/events.json): `Resources/events.json`
- [Campaign Story](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/story.gd): `src/simulation/story.gd`

### Surface Exploration

- [Rover Expeditions](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/simulation/rover_expedition.gd): `src/simulation/rover_expedition.gd`
- [Expedition Scene](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/rover_expedition.tscn): `scenes/rover_expedition.tscn`
- [Rover Control](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_drive.gd): `src/world/rover_drive.gd`
- [Rover Scanner](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_scanner.gd): `src/world/rover_scanner.gd`
- [Sample Arm](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/rover_sample_arm.gd): `src/world/rover_sample_arm.gd`
- [Polar Terrain](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/polar_terrain.gd): `src/world/polar_terrain.gd`

### Player Interface

- [Mission Dashboard](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_dashboard.tscn): `scenes/mission_dashboard.tscn`
- [Crew Dialogue](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/ui/crew_dialogue.gd): `src/ui/crew_dialogue.gd`
- [Crew Activities](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/world/crew_fieldwork.gd): `src/world/crew_fieldwork.gd`
- [Mission Ending](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/scenes/mission_ending.tscn): `scenes/mission_ending.tscn`

### Runtime Services

- [Mission Session](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/mission_session.gd): `src/runtime/mission_session.gd`
- [Mission Saves](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/mission_save.gd): `src/runtime/mission_save.gd`
- [Game Settings](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/game_settings.gd): `src/runtime/game_settings.gd`
- [Game Audio](https://github.com/nafiz-codes/peaks-of-eternal-light/blob/main/src/runtime/game_audio.gd): `src/runtime/game_audio.gd`

### Other components

- **Player**

## Connections

- Player → Startup: launches (evidence: `README.md`)
- Startup → Landing Selection: opens (evidence: `README.md`)
- Player → Landing Selection: chooses site (evidence: `README.md`)
- Landing Selection → Outpost World: begins campaign
- Player → Mission Planning: plans construction
- Mission Planning → Mission Planner: configures
- Mission Planner → Mission Simulator: simulates
- Mission Simulator → Mission State: updates
- Player → Mission Dashboard: monitors resources (evidence: `README.md`)
- Player → Mission Decisions: resolves decisions (evidence: `README.md`)
- Mission Decisions → Campaign Story: shapes campaign
- Player → Outpost World: explores on foot (evidence: `README.md`)
- Player → Crew Dialogue: talks with crew (evidence: `README.md`)
- Outpost World → Crew Activities: hosts activities
- Player → Expedition Scene: starts expedition (evidence: `README.md`)
- Expedition Scene → Rover Expeditions: runs objectives
- Player → Rover Control: drives rover (evidence: `README.md`)
- Rover Control → Rover Scanner: scans targets
- Rover Control → Sample Arm: collects samples
- Player → Polar Terrain: surveys surface
- Player → Mission Ending: reviews outcome (evidence: `README.md`)
- Player → Mission Saves: saves mission (evidence: `README.md`)
- Player → Game Settings: customizes settings (evidence: `README.md`)
- Player → Game Audio: adjusts audio
- Mission Session → Mission Saves: persists progress
