# iverramos/anotha-one architecture

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

- Interactive diagram: https://gitdiagram.com/iverramos/anotha-one
- Repository: https://github.com/iverramos/anotha-one

## Overview

Gloamroot is a Swing/Java2D action roguelite. The player’s main loop is: keyboard and mouse input reaches the game simulation, which updates the player and dungeon room, resolves combat and pickups, then renders the scene and HUD. Distinct gameplay stages include room exploration, enemy and boss encounters, loot and weapon progression, and Han’s food buffs. The graph reflects README-documented features as well as sampled code; several relationships for unsampled systems are omitted rather than inferred.

Main entry points: [`src/Game.java`](https://github.com/iverramos/anotha-one/blob/main/src/Game.java) (Game Simulation), [`src/world/Room.java`](https://github.com/iverramos/anotha-one/blob/main/src/world/Room.java) (Dungeon Room), [`src/entities/Player.java`](https://github.com/iverramos/anotha-one/blob/main/src/entities/Player.java) (Player), [`src/audio/SoundManager.java`](https://github.com/iverramos/anotha-one/blob/main/src/audio/SoundManager.java) (Procedural Sound)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game Runtime"]
  node_game["Game Simulation<br/>[Game.java]"]
  node_loop["Game Loop<br/>[GameLoop.java]"]
  node_input["Input Handler<br/>[InputHandler.java]"]
end

subgraph group_world["Dungeon World"]
  node_dungeon["Dungeon<br/>[Dungeon.java]"]
  node_room["Dungeon Room<br/>[Room.java]"]
  node_tilemap["Tile Map<br/>[TileMap.java]"]
end

subgraph group_combat["Combat and Loot"]
  node_player["Player<br/>[Player.java]"]
  node_weapon["Weapon Arsenal<br/>[Weapon.java]"]
  node_enemy["Enemy AI<br/>[Enemy.java]"]
  node_boss["Belial Boss<br/>[BossEnemy.java]"]
  node_projectile["Projectiles<br/>[Projectile.java]"]
  node_damage["Damage Numbers<br/>[DamageNumber.java]"]
  node_particle["Combat Effects<br/>[Particle.java]"]
end

subgraph group_presentation["Presentation and Audio"]
  node_hud["HUD and Minimap<br/>[HUD.java]"]
  node_renderer["Frame Renderer<br/>[Renderer.java]"]
  node_sprites["Sprite Assets<br/>[SpriteManager.java]"]
  node_sound["Procedural Sound<br/>[SoundManager.java]"]
end

subgraph group_progression["Run Progression"]
  node_pickup["Loot Pickups<br/>[Pickup.java]"]
  node_chest["Treasure Chest<br/>[Chest.java]"]
  node_foodcart["Han’s Food Cart<br/>[FoodCart.java]"]
  node_foodmenu["Food Buff Menu<br/>[FoodMenu.java]"]
end

node_actor(("Player"))

node_actor -->|"provides controls"| node_input
node_input -->|"supplies input"| node_game
node_loop -->|"updates and renders"| node_game
node_game -->|"updates combat"| node_player
node_game -->|"manages rooms"| node_dungeon
node_dungeon -->|"creates rooms"| node_room
node_room -->|"builds layout"| node_tilemap
node_room -->|"populates encounters"| node_enemy
node_room -->|"spawns boss"| node_boss
node_room -->|"places treasure"| node_chest
node_room -->|"places vendor"| node_foodcart
node_player -->|"uses arsenal"| node_weapon
node_player -->|"fires projectiles"| node_projectile
node_game -->|"resolves collisions"| node_projectile
node_game -->|"collects loot"| node_pickup
node_enemy -->|"records contact damage"| node_damage
node_game -->|"updates combat display"| node_damage
node_player -->|"creates dash effects"| node_particle
node_game -->|"manages menu"| node_foodmenu
node_foodmenu -->|"applies food buffs"| node_player
node_game -->|"renders status"| node_hud
node_game -->|"draws game frame"| node_renderer
node_renderer -.->|"uses sprites"| node_sprites
node_game -->|"plays effects"| node_sound
node_player -->|"plays action sounds"| node_sound
node_boss -->|"plays boss sounds"| node_sound

click node_player "https://github.com/iverramos/anotha-one/blob/main/src/entities/Player.java"
click node_weapon "https://github.com/iverramos/anotha-one/blob/main/src/combat/Weapon.java"
click node_enemy "https://github.com/iverramos/anotha-one/blob/main/src/entities/Enemy.java"
click node_boss "https://github.com/iverramos/anotha-one/blob/main/src/entities/BossEnemy.java"
click node_projectile "https://github.com/iverramos/anotha-one/blob/main/src/entities/Projectile.java"
click node_damage "https://github.com/iverramos/anotha-one/blob/main/src/combat/DamageNumber.java"
click node_particle "https://github.com/iverramos/anotha-one/blob/main/src/entities/Particle.java"
click node_pickup "https://github.com/iverramos/anotha-one/blob/main/src/entities/Pickup.java"
click node_chest "https://github.com/iverramos/anotha-one/blob/main/src/entities/Chest.java"
click node_foodcart "https://github.com/iverramos/anotha-one/blob/main/src/entities/FoodCart.java"
click node_foodmenu "https://github.com/iverramos/anotha-one/blob/main/src/ui/FoodMenu.java"
click node_game "https://github.com/iverramos/anotha-one/blob/main/src/Game.java"
click node_loop "https://github.com/iverramos/anotha-one/blob/main/src/GameLoop.java"
click node_input "https://github.com/iverramos/anotha-one/blob/main/src/input/InputHandler.java"
click node_dungeon "https://github.com/iverramos/anotha-one/blob/main/src/world/Dungeon.java"
click node_room "https://github.com/iverramos/anotha-one/blob/main/src/world/Room.java"
click node_tilemap "https://github.com/iverramos/anotha-one/blob/main/src/world/TileMap.java"
click node_hud "https://github.com/iverramos/anotha-one/blob/main/src/ui/HUD.java"
click node_renderer "https://github.com/iverramos/anotha-one/blob/main/src/rendering/Renderer.java"
click node_sprites "https://github.com/iverramos/anotha-one/blob/main/src/rendering/SpriteManager.java"
click node_sound "https://github.com/iverramos/anotha-one/blob/main/src/audio/SoundManager.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_game,node_loop,node_input toneBlue
class node_dungeon,node_room,node_tilemap toneAmber
class node_player,node_weapon,node_enemy,node_boss,node_projectile,node_damage,node_particle toneMint
class node_hud,node_renderer,node_sprites,node_sound toneRose
class node_pickup,node_chest,node_foodcart,node_foodmenu,node_actor toneIndigo
```

## Components

### Game Runtime

- [Game Simulation](https://github.com/iverramos/anotha-one/blob/main/src/Game.java): `src/Game.java`
- [Game Loop](https://github.com/iverramos/anotha-one/blob/main/src/GameLoop.java): `src/GameLoop.java`
- [Input Handler](https://github.com/iverramos/anotha-one/blob/main/src/input/InputHandler.java): `src/input/InputHandler.java`

### Dungeon World

- [Dungeon](https://github.com/iverramos/anotha-one/blob/main/src/world/Dungeon.java): `src/world/Dungeon.java`
- [Dungeon Room](https://github.com/iverramos/anotha-one/blob/main/src/world/Room.java): `src/world/Room.java`
- [Tile Map](https://github.com/iverramos/anotha-one/blob/main/src/world/TileMap.java): `src/world/TileMap.java`

### Combat and Loot

- [Player](https://github.com/iverramos/anotha-one/blob/main/src/entities/Player.java): `src/entities/Player.java`
- [Weapon Arsenal](https://github.com/iverramos/anotha-one/blob/main/src/combat/Weapon.java): `src/combat/Weapon.java`
- [Enemy AI](https://github.com/iverramos/anotha-one/blob/main/src/entities/Enemy.java): `src/entities/Enemy.java`
- [Belial Boss](https://github.com/iverramos/anotha-one/blob/main/src/entities/BossEnemy.java): `src/entities/BossEnemy.java`
- [Projectiles](https://github.com/iverramos/anotha-one/blob/main/src/entities/Projectile.java): `src/entities/Projectile.java`
- [Damage Numbers](https://github.com/iverramos/anotha-one/blob/main/src/combat/DamageNumber.java): `src/combat/DamageNumber.java`
- [Combat Effects](https://github.com/iverramos/anotha-one/blob/main/src/entities/Particle.java): `src/entities/Particle.java`

### Presentation and Audio

- [HUD and Minimap](https://github.com/iverramos/anotha-one/blob/main/src/ui/HUD.java): `src/ui/HUD.java`
- [Frame Renderer](https://github.com/iverramos/anotha-one/blob/main/src/rendering/Renderer.java): `src/rendering/Renderer.java`
- [Sprite Assets](https://github.com/iverramos/anotha-one/blob/main/src/rendering/SpriteManager.java): `src/rendering/SpriteManager.java`
- [Procedural Sound](https://github.com/iverramos/anotha-one/blob/main/src/audio/SoundManager.java): `src/audio/SoundManager.java`

### Run Progression

- [Loot Pickups](https://github.com/iverramos/anotha-one/blob/main/src/entities/Pickup.java): `src/entities/Pickup.java`
- [Treasure Chest](https://github.com/iverramos/anotha-one/blob/main/src/entities/Chest.java): `src/entities/Chest.java`
- [Han’s Food Cart](https://github.com/iverramos/anotha-one/blob/main/src/entities/FoodCart.java): `src/entities/FoodCart.java`
- [Food Buff Menu](https://github.com/iverramos/anotha-one/blob/main/src/ui/FoodMenu.java): `src/ui/FoodMenu.java`

### Other components

- **Player**

## Connections

- Player → Input Handler: provides controls (evidence: `README.md`)
- Input Handler → Game Simulation: supplies input (evidence: `src/Game.java`)
- Game Loop → Game Simulation: updates and renders (evidence: `src/GameLoop.java`)
- Game Simulation → Player: updates combat (evidence: `src/Game.java`)
- Game Simulation → Dungeon: manages rooms (evidence: `src/Game.java`)
- Dungeon → Dungeon Room: creates rooms (evidence: `src/world/Dungeon.java`)
- Dungeon Room → Tile Map: builds layout (evidence: `src/world/Room.java`)
- Dungeon Room → Enemy AI: populates encounters (evidence: `src/world/Room.java`)
- Dungeon Room → Belial Boss: spawns boss (evidence: `src/world/Room.java`)
- Dungeon Room → Treasure Chest: places treasure (evidence: `src/world/Room.java`)
- Dungeon Room → Han’s Food Cart: places vendor (evidence: `src/world/Room.java`)
- Player → Weapon Arsenal: uses arsenal (evidence: `src/entities/Player.java`)
- Player → Projectiles: fires projectiles (evidence: `src/entities/Player.java`)
- Game Simulation → Projectiles: resolves collisions (evidence: `src/Game.java`)
- Game Simulation → Loot Pickups: collects loot (evidence: `src/Game.java`)
- Enemy AI → Damage Numbers: records contact damage (evidence: `src/entities/Enemy.java`)
- Game Simulation → Damage Numbers: updates combat display (evidence: `src/Game.java`)
- Player → Combat Effects: creates dash effects (evidence: `src/entities/Player.java`)
- Game Simulation → Food Buff Menu: manages menu (evidence: `src/Game.java`)
- Food Buff Menu → Player: applies food buffs (evidence: `src/ui/FoodMenu.java`)
- Game Simulation → HUD and Minimap: renders status (evidence: `src/Game.java`)
- Game Simulation → Frame Renderer: draws game frame (evidence: `src/Game.java`)
- Frame Renderer → Sprite Assets: uses sprites
- Game Simulation → Procedural Sound: plays effects (evidence: `src/Game.java`)
- Player → Procedural Sound: plays action sounds (evidence: `src/entities/Player.java`)
- Belial Boss → Procedural Sound: plays boss sounds (evidence: `src/entities/BossEnemy.java`)
