# sivram04/vr-fps-game-prototype architecture

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

- Interactive diagram: https://gitdiagram.com/sivram04/vr-fps-game-prototype
- Repository: https://github.com/sivram04/vr-fps-game-prototype

## Overview

This is a Unity VR first-person shooter prototype. The documented gameplay loop is to shoot uniquely identified targets during a 1.5-minute session, update the on-canvas score, and store player-performance data including score, completion time, and time-to-hit per target. The graph maps those documented stages to likely implementation files named in the repository; no source excerpts were provided, so relationships are limited to claims in the README and implementation details remain unverified.

Main entry points: [`Assets`](https://github.com/sivram04/vr-fps-game-prototype/tree/main/Assets) (Shootable targets), [`Assets/GameData.cs`](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameData.cs) (Performance record), [`Assets/ScoreManager.cs`](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/ScoreManager.cs) (Score tracking), [`Assets/GameSessionManager.cs`](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameSessionManager.cs) (Timed session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_combat["VR combat"]
  node_gun["Gun<br/>[Gun.cs]"]
  node_targets["Shootable targets"]
end

subgraph group_session["Session and scoring"]
  node_session["Timed session"]
  node_score["Score tracking<br/>[ScoreManager.cs]"]
  node_score_ui["Canvas score<br/>[ScoreManager.cs]"]
end

subgraph group_results["Performance data"]
  node_hit_data["Target hit data<br/>[TargetHitData.cs]"]
  node_game_data["Performance record<br/>[GameData.cs]"]
  node_json[("JSON file<br/>[game_data.json]")]
end

node_player(("Player"))

node_player -->|"uses"| node_gun
node_gun -->|"shoots"| node_targets
node_targets -->|"updates on hit"| node_score
node_score -->|"updates display"| node_score_ui
node_session -->|"limits to 1.5 minutes"| node_targets
node_targets -->|"records hit times"| node_hit_data
node_session -->|"records completion time"| node_game_data
node_score -->|"records total points"| node_game_data
node_hit_data -->|"includes hit timings"| node_game_data
node_game_data -->|"stored as JSON"| node_json

click node_gun "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/Gun.cs"
click node_targets "https://github.com/sivram04/vr-fps-game-prototype/tree/main/Assets"
click node_session "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameSessionManager.cs"
click node_score "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/ScoreManager.cs"
click node_score_ui "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/ScoreManager.cs"
click node_hit_data "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/TargetHitData.cs"
click node_game_data "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameData.cs"
click node_json "https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/game_data.json"

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_gun,node_targets toneBlue
class node_session,node_score,node_score_ui toneAmber
class node_hit_data,node_game_data,node_json toneMint
class node_player toneIndigo
```

## Components

### VR combat

- [Gun](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/Gun.cs): `Assets/Gun.cs`
- [Shootable targets](https://github.com/sivram04/vr-fps-game-prototype/tree/main/Assets): `Assets`

### Session and scoring

- [Timed session](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameSessionManager.cs): `Assets/GameSessionManager.cs`
- [Score tracking](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/ScoreManager.cs): `Assets/ScoreManager.cs`
- [Canvas score](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/ScoreManager.cs): `Assets/ScoreManager.cs`

### Performance data

- [Target hit data](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/TargetHitData.cs): `Assets/TargetHitData.cs`
- [Performance record](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/GameData.cs): `Assets/GameData.cs`
- [JSON file](https://github.com/sivram04/vr-fps-game-prototype/blob/main/Assets/game_data.json): `Assets/game_data.json`

### Other components

- **Player**

## Connections

- Player → Gun: uses (evidence: `README.md`)
- Gun → Shootable targets: shoots (evidence: `README.md`)
- Shootable targets → Score tracking: updates on hit (evidence: `README.md`)
- Score tracking → Canvas score: updates display (evidence: `README.md`)
- Timed session → Shootable targets: limits to 1.5 minutes (evidence: `README.md`)
- Shootable targets → Target hit data: records hit times (evidence: `README.md`)
- Timed session → Performance record: records completion time (evidence: `README.md`)
- Score tracking → Performance record: records total points (evidence: `README.md`)
- Target hit data → Performance record: includes hit timings (evidence: `README.md`)
- Performance record → JSON file: stored as JSON (evidence: `README.md`)
