# 4133947859823749823749834768970802/gdmania architecture

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

- Interactive diagram: https://gitdiagram.com/4133947859823749823749834768970802/gdmania
- Repository: https://github.com/4133947859823749823749834768970802/gdmania

## Overview

GD!Mania adds a rhythm lane to Geometry Dash when a replay matching the current level is available. The user places a supported replay in the mod’s Replays folder; the play-layer hook finds and loads it, parsing input events into replay data that the lane renders and updates against game time and button input. The README documents scroll speed, direction, and lane opacity settings; their implementation is not shown in the excerpts. Format parsers are grouped because they share a directory and are dispatched by the parser. Some internal relationships are omitted where source excerpts do not establish the call.

Main entry points: [`src/Overlay/Lane.cpp`](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Lane.cpp) (Lane Renderer), [`src/Hooks/PlayLayer.h`](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Hooks/PlayLayer.h) (Play Layer Hook), [`src/Replay/Replay.cpp`](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Replay.cpp) (Replay Matching), [`src/Storage/Storage.cpp`](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Storage/Storage.cpp) (Replay Folder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Mod and Storage"]
  node_mod_entry["Mod Startup<br/>[main.cpp]"]
  node_storage["Replay Folder<br/>[Storage.cpp]"]
end

subgraph group_replay["Replay Processing"]
  node_replay_load["Replay Matching<br/>[Replay.cpp]"]
  node_parser["Format Dispatch<br/>[Parser.h]"]
  node_format_parsers["Format Parsers"]
  node_replay_data["Replay Data<br/>[Replay.h]"]
end

subgraph group_lane["Rhythm Lane"]
  node_lane["Lane Renderer<br/>[Lane.cpp]"]
  node_object_pool["Note Pool<br/>[Pool.cpp]"]
  node_note_object["Note Visuals<br/>[Object.cpp]"]
  node_lane_settings["Lane Settings<br/>[Lane.cpp]"]
end

subgraph group_game["Game Integration"]
  node_play_hook["Play Layer Hook<br/>[PlayLayer.h]"]
end

node_player(("Player"))
node_replay_files[("Replay Files")]
node_geometry_dash(("Geometry Dash"))

node_player -->|"places replay"| node_replay_files
node_mod_entry -->|"initializes"| node_storage
node_storage -->|"creates folder"| node_replay_files
node_replay_files -->|"provides matching file"| node_replay_load
node_play_hook -->|"finds and loads"| node_replay_load
node_replay_load -->|"parses replay"| node_parser
node_parser -->|"dispatches formats"| node_format_parsers
node_replay_load -->|"uses replay folder"| node_storage
node_play_hook -->|"creates and attaches"| node_lane
node_lane -->|"reads replay"| node_replay_data
node_lane -->|"uses pool"| node_object_pool
node_object_pool -->|"manages objects"| node_note_object
node_play_hook -->|"updates time and input"| node_lane
node_play_hook -->|"hooks gameplay"| node_geometry_dash
node_lane_settings -.->|"configures display"| node_lane

click node_mod_entry "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/main.cpp"
click node_storage "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Storage/Storage.cpp"
click node_play_hook "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Hooks/PlayLayer.h"
click node_replay_load "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Replay.cpp"
click node_parser "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Parser/Parser.h"
click node_format_parsers "https://github.com/4133947859823749823749834768970802/gdmania/tree/main/src/Replay/Parser/Formats"
click node_replay_data "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Replay.h"
click node_lane "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Lane.cpp"
click node_object_pool "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Pool/Pool.cpp"
click node_note_object "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Object/Object.cpp"
click node_lane_settings "https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Lane.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_mod_entry,node_storage toneBlue
class node_replay_load,node_parser,node_format_parsers,node_replay_data,node_replay_files toneAmber
class node_lane,node_object_pool,node_note_object,node_lane_settings toneMint
class node_play_hook toneRose
class node_player,node_geometry_dash toneIndigo
```

## Components

### Mod and Storage

- [Mod Startup](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/main.cpp): `src/main.cpp`
- [Replay Folder](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Storage/Storage.cpp): `src/Storage/Storage.cpp`

### Replay Processing

- [Replay Matching](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Replay.cpp): `src/Replay/Replay.cpp`
- [Format Dispatch](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Parser/Parser.h): `src/Replay/Parser/Parser.h`
- [Format Parsers](https://github.com/4133947859823749823749834768970802/gdmania/tree/main/src/Replay/Parser/Formats): `src/Replay/Parser/Formats`
- [Replay Data](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Replay/Replay.h): `src/Replay/Replay.h`

### Rhythm Lane

- [Lane Renderer](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Lane.cpp): `src/Overlay/Lane.cpp`
- [Note Pool](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Pool/Pool.cpp): `src/Overlay/Pool/Pool.cpp`
- [Note Visuals](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Object/Object.cpp): `src/Overlay/Object/Object.cpp`
- [Lane Settings](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Overlay/Lane.cpp): `src/Overlay/Lane.cpp`

### Game Integration

- [Play Layer Hook](https://github.com/4133947859823749823749834768970802/gdmania/blob/main/src/Hooks/PlayLayer.h): `src/Hooks/PlayLayer.h`

### Other components

- **Player**
- **Replay Files**
- **Geometry Dash**

## Connections

- Player → Replay Files: places replay (evidence: `README.md`)
- Mod Startup → Replay Folder: initializes (evidence: `src/main.cpp`)
- Replay Folder → Replay Files: creates folder (evidence: `src/Storage/Storage.cpp`)
- Replay Files → Replay Matching: provides matching file (evidence: `README.md`)
- Play Layer Hook → Replay Matching: finds and loads (evidence: `src/Hooks/PlayLayer.h`)
- Replay Matching → Format Dispatch: parses replay (evidence: `src/Replay/Replay.cpp`)
- Format Dispatch → Format Parsers: dispatches formats (evidence: `src/Replay/Parser/Parser.h`)
- Replay Matching → Replay Folder: uses replay folder (evidence: `src/Replay/Replay.cpp`)
- Play Layer Hook → Lane Renderer: creates and attaches (evidence: `src/Hooks/PlayLayer.h`)
- Lane Renderer → Replay Data: reads replay
- Lane Renderer → Note Pool: uses pool
- Note Pool → Note Visuals: manages objects
- Play Layer Hook → Lane Renderer: updates time and input (evidence: `src/Hooks/PlayLayer.h`)
- Play Layer Hook → Geometry Dash: hooks gameplay (evidence: `src/Hooks/PlayLayer.h`)
- Lane Settings → Lane Renderer: configures display (evidence: `src/Overlay/Lane.cpp`)
