# itsamecycy/hit architecture

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

- Interactive diagram: https://gitdiagram.com/itsamecycy/hit
- Repository: https://github.com/itsamecycy/hit

## Overview

HIT is a small Raylib first-person-shooter exercise. The user-facing flow is menu selection into real-time first-person movement around obstacles, with grappling, pause/settings navigation, and rendered/audio feedback; credits and menu music are also handled by the game loop. A separate loadout/model path exists in source, but the sampled main loop does not connect it to gameplay. The map interface and manual are present in the tree, but their contents were not sampled, so their runtime role is unclear.

Main entry points: [`HITler/src/main.cpp`](https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp) (Game State Loop), [`HITler/src/system/playerMovement.cpp`](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/playerMovement.cpp) (Player Movement), [`HITler/src/scenes/mainMenu.cpp`](https://github.com/itsamecycy/hit/blob/main/HITler/src/scenes/mainMenu.cpp) (Main Menu), [`HITler/src/system/pauseSystem.cpp`](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/pauseSystem.cpp) (Pause Menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game Loop"]
  node_main["Game State Loop<br/>[main.cpp]"]
  node_audio["Audio Playback<br/>[main.cpp]"]
  node_soundfiles["Sound Assets"]
end

subgraph group_ui["Menus And Settings"]
  node_menu["Main Menu<br/>[mainMenu.cpp]"]
  node_pause["Pause Menu<br/>[pauseSystem.cpp]"]
  node_settings["Settings<br/>[settings.cpp]"]
end

subgraph group_play["Gameplay"]
  node_movement["Player Movement<br/>[playerMovement.cpp]"]
  node_obstacles["Obstacle State<br/>[main.cpp]"]
  node_scene["Gameplay Rendering<br/>[main.cpp]"]
end

subgraph group_weapons["Loadout And Models"]
  node_loadout["Weapon Loadout<br/>[loadout.cpp]"]
  node_gun["Gun Model<br/>[guns.cpp]"]
  node_models["Gun Assets"]
end

node_player(("Player"))
node_raylib["Raylib Runtime"]
node_display(("Game Display"))

node_player -->|"provides input"| node_main
node_main -->|"updates and draws"| node_menu
node_main -->|"updates and draws"| node_pause
node_main -->|"updates and draws"| node_settings
node_main -->|"updates"| node_movement
node_main -->|"provides collision data"| node_obstacles
node_main -->|"provides obstacles"| node_movement
node_movement -->|"updates camera"| node_main
node_main -->|"draws gameplay"| node_scene
node_main -->|"controls playback"| node_audio
node_audio -->|"loads audio"| node_soundfiles
node_loadout -->|"loads and previews"| node_gun
node_gun -->|"loads models"| node_models
node_main -->|"uses window and audio"| node_raylib
node_menu -->|"reads input and draws"| node_raylib
node_pause -->|"reads input and draws"| node_raylib
node_settings -->|"reads input and draws"| node_raylib
node_movement -->|"reads input and collision"| node_raylib
node_scene -->|"draws scene"| node_raylib
node_main -->|"presents frames"| node_display
node_audio -->|"plays sounds"| node_raylib

click node_main "https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp"
click node_menu "https://github.com/itsamecycy/hit/blob/main/HITler/src/scenes/mainMenu.cpp"
click node_pause "https://github.com/itsamecycy/hit/blob/main/HITler/src/system/pauseSystem.cpp"
click node_settings "https://github.com/itsamecycy/hit/blob/main/HITler/src/system/settings.cpp"
click node_movement "https://github.com/itsamecycy/hit/blob/main/HITler/src/system/playerMovement.cpp"
click node_obstacles "https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp"
click node_scene "https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp"
click node_audio "https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp"
click node_loadout "https://github.com/itsamecycy/hit/blob/main/HITler/src/system/loadout.cpp"
click node_gun "https://github.com/itsamecycy/hit/blob/main/HITler/src/models/guns.cpp"
click node_models "https://github.com/itsamecycy/hit/tree/main/HITler/assets/models/guns"
click node_soundfiles "https://github.com/itsamecycy/hit/tree/main/HITler/assets/sounds"

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_main,node_audio,node_soundfiles toneBlue
class node_menu,node_pause,node_settings toneAmber
class node_movement,node_obstacles,node_scene toneMint
class node_loadout,node_gun,node_models toneRose
class node_player,node_raylib,node_display toneIndigo
```

## Components

### Game Loop

- [Game State Loop](https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp): `HITler/src/main.cpp`
- [Audio Playback](https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp): `HITler/src/main.cpp`
- [Sound Assets](https://github.com/itsamecycy/hit/tree/main/HITler/assets/sounds): `HITler/assets/sounds`

### Menus And Settings

- [Main Menu](https://github.com/itsamecycy/hit/blob/main/HITler/src/scenes/mainMenu.cpp): `HITler/src/scenes/mainMenu.cpp`
- [Pause Menu](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/pauseSystem.cpp): `HITler/src/system/pauseSystem.cpp`
- [Settings](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/settings.cpp): `HITler/src/system/settings.cpp`

### Gameplay

- [Player Movement](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/playerMovement.cpp): `HITler/src/system/playerMovement.cpp`
- [Obstacle State](https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp): `HITler/src/main.cpp`
- [Gameplay Rendering](https://github.com/itsamecycy/hit/blob/main/HITler/src/main.cpp): `HITler/src/main.cpp`

### Loadout And Models

- [Weapon Loadout](https://github.com/itsamecycy/hit/blob/main/HITler/src/system/loadout.cpp): `HITler/src/system/loadout.cpp`
- [Gun Model](https://github.com/itsamecycy/hit/blob/main/HITler/src/models/guns.cpp): `HITler/src/models/guns.cpp`
- [Gun Assets](https://github.com/itsamecycy/hit/tree/main/HITler/assets/models/guns): `HITler/assets/models/guns`

### Other components

- **Player**
- **Raylib Runtime**
- **Game Display**

## Connections

- Player → Game State Loop: provides input
- Game State Loop → Main Menu: updates and draws
- Game State Loop → Pause Menu: updates and draws
- Game State Loop → Settings: updates and draws
- Game State Loop → Player Movement: updates
- Game State Loop → Obstacle State: provides collision data
- Game State Loop → Player Movement: provides obstacles
- Player Movement → Game State Loop: updates camera
- Game State Loop → Gameplay Rendering: draws gameplay
- Game State Loop → Audio Playback: controls playback
- Audio Playback → Sound Assets: loads audio
- Weapon Loadout → Gun Model: loads and previews
- Gun Model → Gun Assets: loads models
- Game State Loop → Raylib Runtime: uses window and audio
- Main Menu → Raylib Runtime: reads input and draws
- Pause Menu → Raylib Runtime: reads input and draws
- Settings → Raylib Runtime: reads input and draws
- Player Movement → Raylib Runtime: reads input and collision
- Gameplay Rendering → Raylib Runtime: draws scene
- Game State Loop → Game Display: presents frames
- Audio Playback → Raylib Runtime: plays sounds
