# raizen-max/bytebound-chronicles-of-the-digital-ninjas architecture

> Architecture diagram of the GitHub repository raizen-max/bytebound-chronicles-of-the-digital-ninjas, 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/raizen-max/bytebound-chronicles-of-the-digital-ninjas
- Repository: https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas

## Overview

Bytebound is a Java educational adventure game. The player starts from the title screen, explores story scenes, interacts with hotspots and dialogue, completes IT-themed puzzles and quests, and reaches an ending; progress can be saved and resumed. The map separates scene/story content, gameplay state and puzzle handling, Swing presentation, and persistence/settings. The README describes hardware and software storylines, but the supplied excerpts do not establish how those choices are implemented. Connections are limited to shown calls and indexed references.

Main entry points: [`src/Main/EventHandler.java`](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/EventHandler.java) (Story events), [`src/Main/GameManager.java`](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/GameManager.java) (Game coordinator), [`src/Main/UI.java`](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/UI.java) (Game UI), [`src/Main/SaveManager.java`](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SaveManager.java) (Save and load)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_story["Story and scenes"]
  node_player_actor["Player<br/>[Player.java]"]
  node_scene_data["Scene content<br/>[SceneData.java]"]
  node_dialogue["Dialogue scripts<br/>[dialogue.txt]"]
end

subgraph group_gameplay["Gameplay systems"]
  node_event_handler["Story events<br/>[EventHandler.java]"]
  node_hotspots["Scene hotspots<br/>[Hotspot.java]"]
  node_puzzle_handler["Puzzle flow<br/>[PuzzleHandler.java]"]
  node_puzzle_content["Puzzle content<br/>[Puzzles.java]"]
  node_scene_changer["Scene transitions<br/>[SceneChanger.java]"]
  node_game_manager["Game coordinator<br/>[GameManager.java]"]
end

subgraph group_presentation["Presentation"]
  node_ui["Game UI<br/>[UI.java]"]
  node_menu_ui["Menus and settings UI<br/>[MenuUI.java]"]
  node_actor["Actor model<br/>[Actor.java]"]
  node_cast["Cast data<br/>[Cast.java]"]
end

subgraph group_persistence["Persistence"]
  node_save_manager["Save and load<br/>[SaveManager.java]"]
  node_settings["Player settings<br/>[Settings.java]"]
  node_save_files[("Save files")]
  node_settings_file["Settings file"]
end

node_player(("Player"))

node_player -->|"starts game"| node_game_manager
node_game_manager -->|"loads settings"| node_settings
node_game_manager -->|"creates UI"| node_ui
node_game_manager -->|"loads script"| node_event_handler
node_game_manager -->|"shows title"| node_scene_changer
node_game_manager -->|"checks puzzle state"| node_puzzle_handler
node_game_manager -->|"saves progress"| node_save_manager
node_event_handler -->|"uses game state"| node_game_manager
node_event_handler -->|"updates flags"| node_player_actor
node_event_handler -->|"checks puzzle"| node_puzzle_content
node_event_handler -->|"checks interactions"| node_hotspots
node_event_handler -->|"routes scenes"| node_scene_changer
node_event_handler -->|"reads script"| node_dialogue
node_scene_changer -->|"reads scene data"| node_scene_data
node_scene_changer -->|"autosaves scene"| node_save_manager
node_puzzle_handler -->|"loads puzzle"| node_puzzle_content
node_puzzle_handler -->|"reports completion"| node_event_handler
node_ui -->|"routes input"| node_event_handler
node_ui -->|"submits answers"| node_puzzle_handler
node_ui -->|"refreshes hotspots"| node_hotspots
node_ui -->|"uses actor data"| node_actor
node_ui -->|"uses cast data"| node_cast
node_menu_ui -->|"uses game state"| node_game_manager
node_menu_ui -->|"updates settings"| node_settings
node_menu_ui -->|"loads and saves"| node_save_manager
node_save_manager -->|"stores progress"| node_player_actor
node_save_manager -->|"validates scene"| node_scene_data
node_save_manager -->|"reads and writes"| node_save_files
node_settings -->|"reads and writes"| node_settings_file

click node_player_actor "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Player.java"
click node_scene_data "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SceneData.java"
click node_dialogue "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/script/dialogue.txt"
click node_event_handler "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/EventHandler.java"
click node_hotspots "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Hotspot.java"
click node_puzzle_handler "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/PuzzleHandler.java"
click node_puzzle_content "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Puzzles.java"
click node_scene_changer "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SceneChanger.java"
click node_game_manager "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/GameManager.java"
click node_ui "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/UI.java"
click node_menu_ui "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/MenuUI.java"
click node_actor "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Actor.java"
click node_cast "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Cast.java"
click node_save_manager "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SaveManager.java"
click node_settings "https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Settings.java"

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_actor,node_scene_data,node_dialogue toneBlue
class node_event_handler,node_hotspots,node_puzzle_handler,node_puzzle_content,node_scene_changer,node_game_manager toneAmber
class node_ui,node_menu_ui,node_actor,node_cast toneMint
class node_save_manager,node_settings,node_save_files,node_settings_file toneRose
class node_player toneIndigo
```

## Components

### Story and scenes

- [Player](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Player.java): `src/Main/Player.java`
- [Scene content](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SceneData.java): `src/Main/SceneData.java`
- [Dialogue scripts](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/script/dialogue.txt): `script/dialogue.txt`

### Gameplay systems

- [Story events](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/EventHandler.java): `src/Main/EventHandler.java`
- [Scene hotspots](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Hotspot.java): `src/Main/Hotspot.java`
- [Puzzle flow](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/PuzzleHandler.java): `src/Main/PuzzleHandler.java`
- [Puzzle content](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Puzzles.java): `src/Main/Puzzles.java`
- [Scene transitions](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SceneChanger.java): `src/Main/SceneChanger.java`
- [Game coordinator](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/GameManager.java): `src/Main/GameManager.java`

### Presentation

- [Game UI](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/UI.java): `src/Main/UI.java`
- [Menus and settings UI](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/MenuUI.java): `src/Main/MenuUI.java`
- [Actor model](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Actor.java): `src/Main/Actor.java`
- [Cast data](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Cast.java): `src/Main/Cast.java`

### Persistence

- [Save and load](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/SaveManager.java): `src/Main/SaveManager.java`
- [Player settings](https://github.com/raizen-max/bytebound-chronicles-of-the-digital-ninjas/blob/main/src/Main/Settings.java): `src/Main/Settings.java`
- **Save files**
- **Settings file**

### Other components

- **Player**

## Connections

- Player → Game coordinator: starts game (evidence: `src/Main/GameManager.java`)
- Game coordinator → Player settings: loads settings (evidence: `src/Main/GameManager.java`)
- Game coordinator → Game UI: creates UI (evidence: `src/Main/GameManager.java`)
- Game coordinator → Story events: loads script (evidence: `src/Main/GameManager.java`)
- Game coordinator → Scene transitions: shows title (evidence: `src/Main/GameManager.java`)
- Game coordinator → Puzzle flow: checks puzzle state (evidence: `src/Main/GameManager.java`)
- Game coordinator → Save and load: saves progress (evidence: `src/Main/GameManager.java`)
- Story events → Game coordinator: uses game state (evidence: `src/Main/EventHandler.java`)
- Story events → Player: updates flags (evidence: `src/Main/EventHandler.java`)
- Story events → Puzzle content: checks puzzle (evidence: `src/Main/EventHandler.java`)
- Story events → Scene hotspots: checks interactions (evidence: `src/Main/EventHandler.java`)
- Story events → Scene transitions: routes scenes (evidence: `src/Main/EventHandler.java`)
- Story events → Dialogue scripts: reads script
- Scene transitions → Scene content: reads scene data (evidence: `src/Main/SceneChanger.java`)
- Scene transitions → Save and load: autosaves scene (evidence: `src/Main/SceneChanger.java`)
- Puzzle flow → Puzzle content: loads puzzle (evidence: `src/Main/PuzzleHandler.java`)
- Puzzle flow → Story events: reports completion (evidence: `src/Main/PuzzleHandler.java`)
- Game UI → Story events: routes input (evidence: `src/Main/UI.java`)
- Game UI → Puzzle flow: submits answers (evidence: `src/Main/UI.java`)
- Game UI → Scene hotspots: refreshes hotspots (evidence: `src/Main/UI.java`)
- Game UI → Actor model: uses actor data (evidence: `src/Main/UI.java`)
- Game UI → Cast data: uses cast data (evidence: `src/Main/UI.java`)
- Menus and settings UI → Game coordinator: uses game state (evidence: `src/Main/MenuUI.java`)
- Menus and settings UI → Player settings: updates settings (evidence: `src/Main/MenuUI.java`)
- Menus and settings UI → Save and load: loads and saves (evidence: `src/Main/MenuUI.java`)
- Save and load → Player: stores progress (evidence: `src/Main/SaveManager.java`)
- Save and load → Scene content: validates scene (evidence: `src/Main/SaveManager.java`)
- Save and load → Save files: reads and writes (evidence: `src/Main/SaveManager.java`)
- Player settings → Settings file: reads and writes (evidence: `src/Main/Settings.java`)
