# ramhemanth09/dv-fire architecture

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

- Interactive diagram: https://gitdiagram.com/ramhemanth09/dv-fire
- Repository: https://github.com/ramhemanth09/dv-fire

## Overview

Shadow Island is an offline tactical battle-royale game, represented by Unity gameplay scripts and a separately playable Three.js web build. The player workflow is menu/setup, enter island combat, move and aim, fire or use equipment, fight escalating AI, then resolve match survival/results; endless mode replenishes eliminated bots. Unity excerpts show combat, damage routing, player controls, and reinforcement ownership. The web engine’s sampled excerpt establishes its UI, scene, and bot loop, but not detailed connections among every documented screen or mechanic.

Main entry points: [`Unity-Scripts/Core/HealthSystem.cs`](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/HealthSystem.cs) (Health and Armor), [`Unity-Scripts/Weapons/WeaponController.cs`](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Weapons/WeaponController.cs) (Weapon Controller), [`web/public/app.js`](https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js) (Web UI), [`Unity-Scripts/Player/PlayerController.cs`](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Player/PlayerController.cs) (Player Movement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Game"]
  node_webserver["Static Server<br/>[server.js]"]
  node_webui["Web UI<br/>[app.js]"]
  node_webengine["3D Game Engine<br/>[app.js]"]
  node_webaudio["Tactical Audio<br/>[app.js]"]
end

subgraph group_player["Player Controls"]
  node_unityplayer["Player Movement"]
  node_camera["Third-Person Camera"]
end

subgraph group_combat["Combat Systems"]
  node_weapons["Weapon Controller"]
  node_weapondata["Weapon Ballistics<br/>[WeaponData.cs]"]
  node_hitbox["Hitbox Routing<br/>[HitboxReceiver.cs]"]
  node_health["Health and Armor<br/>[HealthSystem.cs]"]
  node_enemy["Enemy AI"]
end

subgraph group_match["Match Lifecycle"]
  node_matchmanager["Match Manager"]
  node_unitygame["Unity Match"]
end

node_user(("Player"))
node_browser(("Web Browser"))

node_user -->|"plays in"| node_browser
node_browser -->|"requests assets"| node_webserver
node_webserver -->|"serves files"| node_browser
node_user -->|"navigates screens"| node_webui
node_webui -->|"initializes audio"| node_webaudio
node_webui -->|"starts game"| node_webengine
node_user -->|"controls movement"| node_unityplayer
node_camera -->|"reads aim state"| node_unityplayer
node_unityplayer -->|"heals player"| node_health
node_enemy -->|"fires at player"| node_weapons
node_weapons -->|"reads ballistics"| node_weapondata
node_weapons -->|"registers hit"| node_hitbox
node_hitbox -->|"routes damage"| node_health
node_weapons -->|"applies direct damage"| node_health
node_enemy -->|"checks health"| node_health
node_matchmanager -->|"subscribes kills"| node_health
node_matchmanager -->|"spawns reinforcements"| node_unitygame
node_user -->|"plays match"| node_unitygame

click node_webserver "https://github.com/ramhemanth09/dv-fire/blob/main/web/server.js"
click node_webui "https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js"
click node_webengine "https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js"
click node_webaudio "https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js"
click node_unityplayer "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Player/PlayerController.cs"
click node_camera "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Player/ThirdPersonCameraController.cs"
click node_weapons "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Weapons/WeaponController.cs"
click node_weapondata "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Weapons/WeaponData.cs"
click node_hitbox "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/HitboxReceiver.cs"
click node_health "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/HealthSystem.cs"
click node_enemy "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/AI/EnemyAIController.cs"
click node_matchmanager "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/ShadowIslandGameManager.cs"
click node_unitygame "https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/ShadowIslandGameManager.cs"

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_webserver,node_webui,node_webengine,node_webaudio,node_browser toneBlue
class node_unityplayer,node_camera toneAmber
class node_weapons,node_weapondata,node_hitbox,node_health,node_enemy toneMint
class node_matchmanager,node_unitygame toneRose
class node_user toneIndigo
```

## Components

### Web Game

- [Static Server](https://github.com/ramhemanth09/dv-fire/blob/main/web/server.js): `web/server.js`
- [Web UI](https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js): `web/public/app.js`
- [3D Game Engine](https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js): `web/public/app.js`
- [Tactical Audio](https://github.com/ramhemanth09/dv-fire/blob/main/web/public/app.js): `web/public/app.js`

### Player Controls

- [Player Movement](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Player/PlayerController.cs): `Unity-Scripts/Player/PlayerController.cs`
- [Third-Person Camera](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Player/ThirdPersonCameraController.cs): `Unity-Scripts/Player/ThirdPersonCameraController.cs`

### Combat Systems

- [Weapon Controller](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Weapons/WeaponController.cs): `Unity-Scripts/Weapons/WeaponController.cs`
- [Weapon Ballistics](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Weapons/WeaponData.cs): `Unity-Scripts/Weapons/WeaponData.cs`
- [Hitbox Routing](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/HitboxReceiver.cs): `Unity-Scripts/Core/HitboxReceiver.cs`
- [Health and Armor](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/HealthSystem.cs): `Unity-Scripts/Core/HealthSystem.cs`
- [Enemy AI](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/AI/EnemyAIController.cs): `Unity-Scripts/AI/EnemyAIController.cs`

### Match Lifecycle

- [Match Manager](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/ShadowIslandGameManager.cs): `Unity-Scripts/Core/ShadowIslandGameManager.cs`
- [Unity Match](https://github.com/ramhemanth09/dv-fire/blob/main/Unity-Scripts/Core/ShadowIslandGameManager.cs): `Unity-Scripts/Core/ShadowIslandGameManager.cs`

### Other components

- **Player**
- **Web Browser**

## Connections

- Player → Web Browser: plays in (evidence: `README.md`)
- Web Browser → Static Server: requests assets (evidence: `web/server.js`)
- Static Server → Web Browser: serves files (evidence: `web/server.js`)
- Player → Web UI: navigates screens (evidence: `web/public/app.js`)
- Web UI → Tactical Audio: initializes audio (evidence: `web/public/app.js`)
- Web UI → 3D Game Engine: starts game (evidence: `web/public/app.js`)
- Player → Player Movement: controls movement (evidence: `Unity-Scripts/Player/PlayerController.cs`)
- Third-Person Camera → Player Movement: reads aim state (evidence: `Unity-Scripts/Player/ThirdPersonCameraController.cs`)
- Player Movement → Health and Armor: heals player (evidence: `Unity-Scripts/Player/PlayerController.cs`)
- Enemy AI → Weapon Controller: fires at player (evidence: `Unity-Scripts/AI/EnemyAIController.cs`)
- Weapon Controller → Weapon Ballistics: reads ballistics (evidence: `Unity-Scripts/Weapons/WeaponController.cs`)
- Weapon Controller → Hitbox Routing: registers hit (evidence: `Unity-Scripts/Weapons/WeaponController.cs`)
- Hitbox Routing → Health and Armor: routes damage (evidence: `Unity-Scripts/Core/HitboxReceiver.cs`)
- Weapon Controller → Health and Armor: applies direct damage (evidence: `Unity-Scripts/Weapons/WeaponController.cs`)
- Enemy AI → Health and Armor: checks health (evidence: `Unity-Scripts/AI/EnemyAIController.cs`)
- Match Manager → Health and Armor: subscribes kills (evidence: `Unity-Scripts/Core/ShadowIslandGameManager.cs`)
- Match Manager → Unity Match: spawns reinforcements (evidence: `Unity-Scripts/Core/ShadowIslandGameManager.cs`)
- Player → Unity Match: plays match (evidence: `README.md`)
