# itsamecycy/pirate_adventure architecture

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

- Interactive diagram: https://gitdiagram.com/itsamecycy/pirate_adventure
- Repository: https://github.com/itsamecycy/pirate_adventure

## Overview

Pirate Adventure is a Pygame 2D adventure: the player enters through the menu, creates or loads a character, sees an intro, explores the overworld, and can enter battles or the boss area. Pause and game-over screens provide routes back through the game. The graph highlights combat, character/enemy entities, inventory, and save/settings support. Evidence is partial: scene routing and several internal relationships are visible in excerpts; other README capabilities are represented only where repository paths support them, without assuming unobserved call wiring.

Main entry points: [`Pirate_Adventure/main.py`](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/main.py) (Game Loop), [`Pirate_Adventure/maps/overworld.py`](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/maps/overworld.py) (Overworld), [`Pirate_Adventure/scenes/pause.py`](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/pause.py) (Pause Menu), [`Pirate_Adventure/assets`](https://github.com/itsamecycy/pirate_adventure/tree/main/Pirate_Adventure/assets) (Game Assets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game Runtime"]
  node_main["Game Loop<br/>[main.py]"]
  node_loading["Loading Screen<br/>[loading.py]"]
  node_intro["Intro Scene<br/>[intro.py]"]
  node_assets["Game Assets"]
end

subgraph group_world["World And Encounters"]
  node_overworld["Overworld<br/>[overworld.py]"]
  node_bossarea["Boss Area<br/>[bossArea.py]"]
  node_battle["Battle Scene<br/>[battle.py]"]
  node_playerentity["Player Entity<br/>[player1.py]"]
  node_demon["Demon Enemy<br/>[enemy_demon.py]"]
  node_boss["Boss Entity<br/>[boss.py]"]
  node_quartermaster["Quartermaster<br/>[quartermaster.py]"]
end

subgraph group_systems["Gameplay Systems"]
  node_combat["Combat System<br/>[combatsys.py]"]
  node_inventory["Inventory System<br/>[inventorysys.py]"]
  node_savedata["Save Data<br/>[savedata.py]"]
  node_savefile[("Save State<br/>[save_data.json]")]
  node_settings["Settings System<br/>[settingsys.py]"]
end

subgraph group_menus["Menus And Persistence"]
  node_mainmenu["Main Menu<br/>[mainmenu.py]"]
  node_creation["Character Creation<br/>[charcreation.py]"]
  node_pause["Pause Menu<br/>[pause.py]"]
  node_settingscene["Settings Screen<br/>[settings.py]"]
  node_loadgame["Load Game<br/>[loadgame.py]"]
  node_gameover["Game Over<br/>[gameover.py]"]
end

node_player(("Player"))

node_player -->|"starts at"| node_mainmenu
node_main -->|"creates"| node_mainmenu
node_main -->|"routes to"| node_creation
node_main -->|"routes to"| node_loadgame
node_main -->|"routes to"| node_settingscene
node_main -->|"starts loading"| node_loading
node_main -->|"opens pause"| node_pause
node_main -->|"opens game over"| node_gameover
node_main -->|"creates next"| node_intro
node_main -->|"creates next"| node_overworld
node_creation -->|"starts game"| node_loading
node_loading -->|"advances to"| node_intro
node_intro -->|"advances to"| node_overworld
node_overworld -->|"creates"| node_playerentity
node_overworld -->|"uses"| node_quartermaster
node_overworld -->|"enters"| node_bossarea
node_overworld -->|"starts encounter"| node_battle
node_bossarea -->|"creates"| node_boss
node_battle -->|"uses"| node_combat
node_playerentity -->|"creates"| node_inventory
node_pause -->|"uses"| node_savedata
node_pause -->|"uses"| node_settings
node_pause -->|"recreates"| node_overworld
node_settingscene -->|"uses"| node_settings
node_loadgame -->|"loads via"| node_savedata
node_savedata -->|"reads and writes"| node_savefile
node_playerentity -->|"loads sprites"| node_assets
node_demon -->|"loads sprites"| node_assets
node_boss -->|"loads sprites"| node_assets
node_overworld -->|"loads map art"| node_assets

click node_main "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/main.py"
click node_mainmenu "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/mainmenu.py"
click node_creation "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/charcreation.py"
click node_loading "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/loading.py"
click node_intro "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/intro.py"
click node_overworld "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/maps/overworld.py"
click node_bossarea "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/maps/bossArea.py"
click node_battle "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/battle.py"
click node_playerentity "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/player1.py"
click node_demon "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/enemy_demon.py"
click node_boss "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/boss.py"
click node_quartermaster "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/quartermaster.py"
click node_combat "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/combatsys.py"
click node_inventory "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/inventorysys.py"
click node_pause "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/pause.py"
click node_savedata "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/savedata.py"
click node_savefile "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/save_data.json"
click node_settings "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/settingsys.py"
click node_settingscene "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/settings.py"
click node_loadgame "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/loadgame.py"
click node_gameover "https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/gameover.py"
click node_assets "https://github.com/itsamecycy/pirate_adventure/tree/main/Pirate_Adventure/assets"

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_main,node_loading,node_intro,node_assets toneBlue
class node_overworld,node_bossarea,node_battle,node_playerentity,node_demon,node_boss,node_quartermaster toneAmber
class node_combat,node_inventory,node_savedata,node_savefile,node_settings toneMint
class node_mainmenu,node_creation,node_pause,node_settingscene,node_loadgame,node_gameover toneRose
class node_player toneIndigo
```

## Components

### Game Runtime

- [Game Loop](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/main.py): `Pirate_Adventure/main.py`
- [Loading Screen](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/loading.py): `Pirate_Adventure/scenes/loading.py`
- [Intro Scene](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/intro.py): `Pirate_Adventure/scenes/intro.py`
- [Game Assets](https://github.com/itsamecycy/pirate_adventure/tree/main/Pirate_Adventure/assets): `Pirate_Adventure/assets`

### World And Encounters

- [Overworld](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/maps/overworld.py): `Pirate_Adventure/maps/overworld.py`
- [Boss Area](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/maps/bossArea.py): `Pirate_Adventure/maps/bossArea.py`
- [Battle Scene](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/battle.py): `Pirate_Adventure/scenes/battle.py`
- [Player Entity](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/player1.py): `Pirate_Adventure/entities/player1.py`
- [Demon Enemy](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/enemy_demon.py): `Pirate_Adventure/entities/enemy_demon.py`
- [Boss Entity](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/boss.py): `Pirate_Adventure/entities/boss.py`
- [Quartermaster](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/entities/quartermaster.py): `Pirate_Adventure/entities/quartermaster.py`

### Gameplay Systems

- [Combat System](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/combatsys.py): `Pirate_Adventure/systems/combatsys.py`
- [Inventory System](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/inventorysys.py): `Pirate_Adventure/systems/inventorysys.py`
- [Save Data](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/savedata.py): `Pirate_Adventure/systems/savedata.py`
- [Save State](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/save_data.json): `Pirate_Adventure/save_data.json`
- [Settings System](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/systems/settingsys.py): `Pirate_Adventure/systems/settingsys.py`

### Menus And Persistence

- [Main Menu](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/mainmenu.py): `Pirate_Adventure/scenes/mainmenu.py`
- [Character Creation](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/charcreation.py): `Pirate_Adventure/scenes/charcreation.py`
- [Pause Menu](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/pause.py): `Pirate_Adventure/scenes/pause.py`
- [Settings Screen](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/settings.py): `Pirate_Adventure/scenes/settings.py`
- [Load Game](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/loadgame.py): `Pirate_Adventure/scenes/loadgame.py`
- [Game Over](https://github.com/itsamecycy/pirate_adventure/blob/main/Pirate_Adventure/scenes/gameover.py): `Pirate_Adventure/scenes/gameover.py`

### Other components

- **Player**

## Connections

- Player → Main Menu: starts at
- Game Loop → Main Menu: creates
- Game Loop → Character Creation: routes to
- Game Loop → Load Game: routes to
- Game Loop → Settings Screen: routes to
- Game Loop → Loading Screen: starts loading
- Game Loop → Pause Menu: opens pause
- Game Loop → Game Over: opens game over
- Game Loop → Intro Scene: creates next
- Game Loop → Overworld: creates next
- Character Creation → Loading Screen: starts game
- Loading Screen → Intro Scene: advances to
- Intro Scene → Overworld: advances to
- Overworld → Player Entity: creates
- Overworld → Quartermaster: uses
- Overworld → Boss Area: enters
- Overworld → Battle Scene: starts encounter
- Boss Area → Boss Entity: creates
- Battle Scene → Combat System: uses
- Player Entity → Inventory System: creates
- Pause Menu → Save Data: uses
- Pause Menu → Settings System: uses
- Pause Menu → Overworld: recreates
- Settings Screen → Settings System: uses
- Load Game → Save Data: loads via
- Save Data → Save State: reads and writes
- Player Entity → Game Assets: loads sprites
- Demon Enemy → Game Assets: loads sprites
- Boss Entity → Game Assets: loads sprites
- Overworld → Game Assets: loads map art
