# cjhduke/my-godot-game-aarpg architecture

> Architecture diagram of the GitHub repository cjhduke/my-godot-game-aarpg, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cjhduke/my-godot-game-aarpg
- Repository: https://github.com/cjhduke/my-godot-game-aarpg

## Overview

This repository is a Godot 2D pixel-art action-RPG prototype. Its documented loop is exploration, combat, collecting items, saving, and continuing; players move, attack, use an ability, interact, and talk to NPCs. The graph preserves those stages and the documented inventory, enemy, dialogue, and save/load capabilities. The README supports these product-level relationships, but no source excerpts were available to verify specific callers or finer-grained wiring.

Main entry points: [`Player/Scripts/player.gd`](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/player.gd) (Player), [`Levels`](https://github.com/cjhduke/my-godot-game-aarpg/tree/main/Levels) (Game Levels), [`Enemies/Scripts/enemy.gd`](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Enemies/Scripts/enemy.gd) (Enemies), [`npc/scripts/npc.gd`](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/npc/scripts/npc.gd) (NPCs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Player Gameplay"]
  node_player["Player<br/>[player.gd]"]
  node_player_states["Player States"]
  node_abilities["Player Abilities<br/>[abilities.gd]"]
  node_hit_hurt["Combat Hitboxes<br/>[hit_box.gd]"]
end

subgraph group_world["World Actors"]
  node_enemies["Enemies<br/>[enemy.gd]"]
  node_enemy_states["Enemy States"]
  node_levels["Game Levels"]
  node_interactables["World Interactions"]
  node_npc["NPCs<br/>[npc.gd]"]
  node_dialogue["Dialogue"]
end

subgraph group_progression["Items And UI"]
  node_items["Items And Effects<br/>[item_data.gd]"]
  node_pickup["Item Pickup<br/>[item_pickup.gd]"]
  node_inventory["Inventory<br/>[inventory_data.gd]"]
  node_hud["Player HUD<br/>[player_hud.gd]"]
end

subgraph group_persistence["Game Flow And Saves"]
  node_save["Save Manager"]
  node_level_manager["Level Manager"]
  node_menu["Title And Pause<br/>[title_scene.gd]"]
end

node_user(("Player"))

node_user -->|"controls"| node_player
node_player -->|"uses states"| node_player_states
node_player -->|"uses ability"| node_abilities
node_player -->|"attacks"| node_hit_hurt
node_enemies -->|"uses states"| node_enemy_states
node_levels -->|"hosts"| node_player
node_levels -->|"hosts"| node_enemies
node_player -->|"interacts"| node_interactables
node_player -->|"talks to"| node_npc
node_npc -->|"supports dialogue"| node_dialogue
node_player -->|"collects"| node_pickup
node_pickup -->|"collects item"| node_items
node_player -->|"uses inventory"| node_inventory
node_player -->|"displays status"| node_hud
node_player -->|"saves progress"| node_save
node_save -->|"loads progress"| node_player
node_menu -->|"enters game"| node_level_manager

click node_player "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/player.gd"
click node_player_states "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/player_state_machine.gd"
click node_abilities "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/abilities/abilities.gd"
click node_hit_hurt "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GeneralNodes/HitBox/hit_box.gd"
click node_enemies "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Enemies/Scripts/enemy.gd"
click node_enemy_states "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Enemies/Scripts/enemy_state_machine.gd"
click node_levels "https://github.com/cjhduke/my-godot-game-aarpg/tree/main/Levels"
click node_interactables "https://github.com/cjhduke/my-godot-game-aarpg/tree/main/Interactables"
click node_npc "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/npc/scripts/npc.gd"
click node_dialogue "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Interactables/Dialogue/scripts/dialogue_interaction.gd"
click node_items "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Item/scripts/item_data.gd"
click node_pickup "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Item/item_pickup/item_pickup.gd"
click node_inventory "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GUI/pause_menu/inventory/scripts/inventory_data.gd"
click node_hud "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GUI/player_hud/player_hud.gd"
click node_save "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/00_Globals/global_save_manager.gd"
click node_level_manager "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/00_Globals/GlobalLevelManager.gd"
click node_menu "https://github.com/cjhduke/my-godot-game-aarpg/blob/main/title_scene/title_scene.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_player_states,node_abilities,node_hit_hurt toneBlue
class node_enemies,node_enemy_states,node_levels,node_interactables,node_npc,node_dialogue toneAmber
class node_items,node_pickup,node_inventory,node_hud toneMint
class node_save,node_level_manager,node_menu toneRose
class node_user toneIndigo
```

## Components

### Player Gameplay

- [Player](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/player.gd): `Player/Scripts/player.gd`
- [Player States](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/player_state_machine.gd): `Player/Scripts/player_state_machine.gd`
- [Player Abilities](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Player/Scripts/abilities/abilities.gd): `Player/Scripts/abilities/abilities.gd`
- [Combat Hitboxes](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GeneralNodes/HitBox/hit_box.gd): `GeneralNodes/HitBox/hit_box.gd`

### World Actors

- [Enemies](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Enemies/Scripts/enemy.gd): `Enemies/Scripts/enemy.gd`
- [Enemy States](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Enemies/Scripts/enemy_state_machine.gd): `Enemies/Scripts/enemy_state_machine.gd`
- [Game Levels](https://github.com/cjhduke/my-godot-game-aarpg/tree/main/Levels): `Levels`
- [World Interactions](https://github.com/cjhduke/my-godot-game-aarpg/tree/main/Interactables): `Interactables`
- [NPCs](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/npc/scripts/npc.gd): `npc/scripts/npc.gd`
- [Dialogue](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Interactables/Dialogue/scripts/dialogue_interaction.gd): `Interactables/Dialogue/scripts/dialogue_interaction.gd`

### Items And UI

- [Items And Effects](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Item/scripts/item_data.gd): `Item/scripts/item_data.gd`
- [Item Pickup](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/Item/item_pickup/item_pickup.gd): `Item/item_pickup/item_pickup.gd`
- [Inventory](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GUI/pause_menu/inventory/scripts/inventory_data.gd): `GUI/pause_menu/inventory/scripts/inventory_data.gd`
- [Player HUD](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/GUI/player_hud/player_hud.gd): `GUI/player_hud/player_hud.gd`

### Game Flow And Saves

- [Save Manager](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/00_Globals/global_save_manager.gd): `00_Globals/global_save_manager.gd`
- [Level Manager](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/00_Globals/GlobalLevelManager.gd): `00_Globals/GlobalLevelManager.gd`
- [Title And Pause](https://github.com/cjhduke/my-godot-game-aarpg/blob/main/title_scene/title_scene.gd): `title_scene/title_scene.gd`

### Other components

- **Player**

## Connections

- Player → Player: controls
- Player → Player States: uses states
- Player → Player Abilities: uses ability
- Player → Combat Hitboxes: attacks
- Enemies → Enemy States: uses states
- Game Levels → Player: hosts
- Game Levels → Enemies: hosts
- Player → World Interactions: interacts
- Player → NPCs: talks to
- NPCs → Dialogue: supports dialogue
- Player → Item Pickup: collects
- Item Pickup → Items And Effects: collects item
- Player → Inventory: uses inventory
- Player → Player HUD: displays status
- Player → Save Manager: saves progress
- Save Manager → Player: loads progress
- Title And Pause → Level Manager: enters game
