# junaed93/hollow-hunger architecture

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

- Interactive diagram: https://gitdiagram.com/junaed93/hollow-hunger
- Repository: https://github.com/junaed93/hollow-hunger

## Overview

Hollow-Hunger is a Pygame maze-survival game. The player starts or restarts a run, navigates levels while avoiding enemies and collecting items, and reaches an exit portal; the game loop updates state and renders the playfield and HUD. The single sampled source file also contains menu, touch controls, and pathfinding. The excerpts show rendering, event handling, enemy damage, and gameplay-music loading, but omit much of level setup and progression, so those connections are not expanded here.

Main entry points: [`main.py`](https://github.com/junaed93/hollow-hunger/blob/main/main.py) (Game Loop), [`hitslab-scary-horror-dark-music-385468.ogg`](https://github.com/junaed93/hollow-hunger/blob/main/hitslab-scary-horror-dark-music-385468.ogg) (Gameplay Music)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game Runtime"]
  node_game["Game Loop<br/>[main.py]"]
end

subgraph group_world["Maze and Actors"]
  node_player["Player<br/>[main.py]"]
  node_enemy["Enemies<br/>[main.py]"]
  node_pathfinding["Pathfinding<br/>[main.py]"]
  node_collectibles["Coins and Soul Orb<br/>[main.py]"]
  node_portal["Exit Portal<br/>[main.py]"]
end

subgraph group_interface["Player Interface"]
  node_controls["Keyboard and Touch<br/>[main.py]"]
  node_rendering["World Rendering<br/>[main.py]"]
  node_hud["HUD and Screens<br/>[main.py]"]
end

subgraph group_audio["Audio Assets"]
  node_music["Gameplay Music"]
end

node_user(("Player"))

node_user -->|"provides input"| node_controls
node_controls -->|"changes game state"| node_game
node_game -->|"applies damage"| node_player
node_enemy -.->|"finds paths"| node_pathfinding
node_game -->|"draws world"| node_rendering
node_rendering -->|"draws"| node_player
node_rendering -->|"draws"| node_enemy
node_rendering -->|"draws"| node_collectibles
node_rendering -->|"draws"| node_portal
node_game -->|"draws interface"| node_hud
node_game -->|"loads and plays"| node_music

click node_player "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_enemy "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_pathfinding "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_collectibles "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_portal "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_game "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_controls "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_rendering "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_hud "https://github.com/junaed93/hollow-hunger/blob/main/main.py"
click node_music "https://github.com/junaed93/hollow-hunger/blob/main/hitslab-scary-horror-dark-music-385468.ogg"

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 toneBlue
class node_player,node_enemy,node_pathfinding,node_collectibles,node_portal toneAmber
class node_controls,node_rendering,node_hud toneMint
class node_music toneRose
class node_user toneIndigo
```

## Components

### Game Runtime

- [Game Loop](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`

### Maze and Actors

- [Player](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [Enemies](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [Pathfinding](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [Coins and Soul Orb](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [Exit Portal](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`

### Player Interface

- [Keyboard and Touch](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [World Rendering](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`
- [HUD and Screens](https://github.com/junaed93/hollow-hunger/blob/main/main.py): `main.py`

### Audio Assets

- [Gameplay Music](https://github.com/junaed93/hollow-hunger/blob/main/hitslab-scary-horror-dark-music-385468.ogg): `hitslab-scary-horror-dark-music-385468.ogg`

### Other components

- **Player**

## Connections

- Player → Keyboard and Touch: provides input (evidence: `main.py`)
- Keyboard and Touch → Game Loop: changes game state (evidence: `main.py`)
- Game Loop → Player: applies damage (evidence: `main.py`)
- Enemies → Pathfinding: finds paths (evidence: `main.py`)
- Game Loop → World Rendering: draws world (evidence: `main.py`)
- World Rendering → Player: draws (evidence: `main.py`)
- World Rendering → Enemies: draws (evidence: `main.py`)
- World Rendering → Coins and Soul Orb: draws (evidence: `main.py`)
- World Rendering → Exit Portal: draws (evidence: `main.py`)
- Game Loop → HUD and Screens: draws interface (evidence: `main.py`)
- Game Loop → Gameplay Music: loads and plays (evidence: `main.py`)
