# clovernoah/balloon_range architecture

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

- Interactive diagram: https://gitdiagram.com/clovernoah/balloon_range
- Repository: https://github.com/clovernoah/balloon_range

## Overview

BalloonRange is a native Windows first-person balloon-target training game. The main user workflow is to choose a preset and tune settings, play by moving and aiming at targets, then view the session result and recent history. The graph preserves documented settings, gameplay, rendering, audio, and persistence capabilities. Some source was not sampled; links without direct call evidence are omitted or marked dashed with null evidence.

Main entry points: [`src/app.cpp`](https://github.com/clovernoah/balloon_range/blob/main/src/app.cpp) (Game Application), [`src/render.cpp`](https://github.com/clovernoah/balloon_range/blob/main/src/render.cpp) (3D and HUD Rendering), [`src/main.cpp`](https://github.com/clovernoah/balloon_range/blob/main/src/main.cpp) (Program Entry), [`src/input.cpp`](https://github.com/clovernoah/balloon_range/blob/main/src/input.cpp) (Input Handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_input["Input Handling<br/>[input.cpp]"]
  node_app["Game Application<br/>[app.cpp]"]
  node_entry["Program Entry<br/>[main.cpp]"]
end

subgraph group_gameplay["Training Gameplay"]
  node_player["Player<br/>[player.cpp]"]
  node_balloons["Balloon Pool<br/>[balloon.cpp]"]
  node_scene["Range Scene<br/>[scene.cpp]"]
  node_scoring["Scoring<br/>[score.cpp]"]
  node_effects["Game Effects<br/>[effect.cpp]"]
end

subgraph group_ui["Interface and Graphics"]
  node_hud["HUD and Panels<br/>[hud.cpp]"]
  node_render["3D and HUD Rendering<br/>[render.cpp]"]
  node_textures["Generated Textures<br/>[texture.cpp]"]
end

subgraph group_state["Settings and Records"]
  node_config["Presets and Parameters<br/>[config.cpp]"]
  node_history[("Session History<br/>[history.cpp]")]
end

subgraph group_support["Platform Services"]
  node_audio["Synthesized Audio<br/>[audio.cpp]"]
  node_core["Math and Timing<br/>[core.cpp]"]
  node_png["PNG Output<br/>[png.cpp]"]
end

node_user(("Player"))

node_user -->|"provides input"| node_input
node_input -.->|"updates controls"| node_app
node_entry -->|"starts and settles"| node_app
node_app -->|"uses parameters"| node_config
node_app -->|"maintains player"| node_player
node_app -->|"maintains pool"| node_balloons
node_app -->|"maintains scene"| node_scene
node_app -->|"maintains score"| node_scoring
node_app -->|"maintains history"| node_history
node_app -->|"maintains effects"| node_effects
node_app -->|"maintains audio"| node_audio
node_app -.->|"renders frames"| node_render
node_balloons -->|"uses field geometry"| node_scene
node_render -->|"draws interface"| node_hud
node_render -.->|"uses textures"| node_textures
node_user -->|"plays sessions"| node_app
node_app -->|"records results"| node_history
node_app -->|"loads and saves"| node_config
node_entry -->|"writes screenshots"| node_png
node_player -->|"uses math"| node_core

click node_player "https://github.com/clovernoah/balloon_range/blob/main/src/player.cpp"
click node_input "https://github.com/clovernoah/balloon_range/blob/main/src/input.cpp"
click node_app "https://github.com/clovernoah/balloon_range/blob/main/src/app.cpp"
click node_config "https://github.com/clovernoah/balloon_range/blob/main/src/config.cpp"
click node_balloons "https://github.com/clovernoah/balloon_range/blob/main/src/balloon.cpp"
click node_scene "https://github.com/clovernoah/balloon_range/blob/main/src/scene.cpp"
click node_scoring "https://github.com/clovernoah/balloon_range/blob/main/src/score.cpp"
click node_effects "https://github.com/clovernoah/balloon_range/blob/main/src/effect.cpp"
click node_history "https://github.com/clovernoah/balloon_range/blob/main/src/history.cpp"
click node_hud "https://github.com/clovernoah/balloon_range/blob/main/src/hud.cpp"
click node_render "https://github.com/clovernoah/balloon_range/blob/main/src/render.cpp"
click node_textures "https://github.com/clovernoah/balloon_range/blob/main/src/texture.cpp"
click node_audio "https://github.com/clovernoah/balloon_range/blob/main/src/audio.cpp"
click node_core "https://github.com/clovernoah/balloon_range/blob/main/src/core.cpp"
click node_png "https://github.com/clovernoah/balloon_range/blob/main/src/png.cpp"
click node_entry "https://github.com/clovernoah/balloon_range/blob/main/src/main.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_input,node_app,node_entry toneBlue
class node_player,node_balloons,node_scene,node_scoring,node_effects toneAmber
class node_hud,node_render,node_textures toneMint
class node_config,node_history toneRose
class node_audio,node_core,node_png,node_user toneIndigo
```

## Components

### Application Runtime

- [Input Handling](https://github.com/clovernoah/balloon_range/blob/main/src/input.cpp): `src/input.cpp`
- [Game Application](https://github.com/clovernoah/balloon_range/blob/main/src/app.cpp): `src/app.cpp`
- [Program Entry](https://github.com/clovernoah/balloon_range/blob/main/src/main.cpp): `src/main.cpp`

### Training Gameplay

- [Player](https://github.com/clovernoah/balloon_range/blob/main/src/player.cpp): `src/player.cpp`
- [Balloon Pool](https://github.com/clovernoah/balloon_range/blob/main/src/balloon.cpp): `src/balloon.cpp`
- [Range Scene](https://github.com/clovernoah/balloon_range/blob/main/src/scene.cpp): `src/scene.cpp`
- [Scoring](https://github.com/clovernoah/balloon_range/blob/main/src/score.cpp): `src/score.cpp`
- [Game Effects](https://github.com/clovernoah/balloon_range/blob/main/src/effect.cpp): `src/effect.cpp`

### Interface and Graphics

- [HUD and Panels](https://github.com/clovernoah/balloon_range/blob/main/src/hud.cpp): `src/hud.cpp`
- [3D and HUD Rendering](https://github.com/clovernoah/balloon_range/blob/main/src/render.cpp): `src/render.cpp`
- [Generated Textures](https://github.com/clovernoah/balloon_range/blob/main/src/texture.cpp): `src/texture.cpp`

### Settings and Records

- [Presets and Parameters](https://github.com/clovernoah/balloon_range/blob/main/src/config.cpp): `src/config.cpp`
- [Session History](https://github.com/clovernoah/balloon_range/blob/main/src/history.cpp): `src/history.cpp`

### Platform Services

- [Synthesized Audio](https://github.com/clovernoah/balloon_range/blob/main/src/audio.cpp): `src/audio.cpp`
- [Math and Timing](https://github.com/clovernoah/balloon_range/blob/main/src/core.cpp): `src/core.cpp`
- [PNG Output](https://github.com/clovernoah/balloon_range/blob/main/src/png.cpp): `src/png.cpp`

### Other components

- **Player**

## Connections

- Player → Input Handling: provides input (evidence: `README.md`)
- Input Handling → Game Application: updates controls
- Program Entry → Game Application: starts and settles (evidence: `src/main.cpp`)
- Game Application → Presets and Parameters: uses parameters
- Game Application → Player: maintains player
- Game Application → Balloon Pool: maintains pool
- Game Application → Range Scene: maintains scene
- Game Application → Scoring: maintains score
- Game Application → Session History: maintains history
- Game Application → Game Effects: maintains effects
- Game Application → Synthesized Audio: maintains audio
- Game Application → 3D and HUD Rendering: renders frames
- Balloon Pool → Range Scene: uses field geometry
- 3D and HUD Rendering → HUD and Panels: draws interface
- 3D and HUD Rendering → Generated Textures: uses textures
- Player → Game Application: plays sessions (evidence: `README.md`)
- Game Application → Session History: records results (evidence: `README.md`)
- Game Application → Presets and Parameters: loads and saves (evidence: `README.md`)
- Program Entry → PNG Output: writes screenshots (evidence: `src/main.cpp`)
- Player → Math and Timing: uses math
