# eps0003/hunter4d architecture

> Architecture diagram of the GitHub repository eps0003/hunter4d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eps0003/hunter4d
- Repository: https://github.com/eps0003/hunter4d

## Overview

##### Supporting Systems (arrange on the sides)
Left Side:
- Models System (/Models)
- Animation System (/Models/Animations)
- Skins System (/Skins)

Right Side:
- Culling System (/Culling)
- Bounds System (/Bounds)
- Utilities (/Utilities)

##### Key Elements to Emphasize

a. Actor System Hierarchy:
- Base Actor
- Hunter Actor
- Spectator Actor
- SquidGamer Actor

b. Loading Pipeline:
- LoadStages sequence
- Generation
- Chunk Generation
- Block Face Generation

c. Gamemode Management:
- GamemodeManager
- Individual gamemodes
- Common gamemode components

##### Implementation Details

- Clear separation between client and server components
- Interpolation system for smooth movement
- Collision detection and response system
- Particle effect system
- Model loading and animation system

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph UI["User Interface & Input Layer"]
        Camera["Camera System"]:::ui
        Mouse["Mouse Control System"]:::ui
        Commands["Command System"]:::ui
    end

    subgraph Logic["Game Logic Layer"]
        Actor["Actor System"]:::logic
        Gamemode["Gamemode System"]:::logic
        Weapons["Weapons System"]:::logic
        Particles["Particle System"]:::logic
    end

    subgraph Engine["Core Engine Layer"]
        Map["Map System"]:::engine
        Collision["Collision System"]:::engine
        Loading["Loading System"]:::engine
        Object["Object System"]:::engine
    end

    subgraph Support1["Supporting Systems Left"]
        Models["Models System"]:::support
        Animation["Animation System"]:::support
        Skins["Skins System"]:::support
    end

    subgraph Support2["Supporting Systems Right"]
        Culling["Culling System"]:::support
        Bounds["Bounds System"]:::support
        Utils["Utilities"]:::support
    end

    %% Connections
    Camera --> Actor
    Mouse --> Actor
    Commands --> Gamemode

    Actor --> Map
    Actor --> Collision
    Actor --> Object

    Gamemode --> Map
    Gamemode --> Actor
    
    Weapons --> Particles
    Weapons --> Actor

    Map --> Loading
    Map --> Culling
    Map --> Bounds

    Models --> Animation
    Models --> Object
    
    Utils --> Actor
    Utils --> Map
    Utils --> Collision

    %% Styles
    classDef ui fill:#90EE90,stroke:#333,stroke-width:2px
    classDef logic fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef engine fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef support fill:#FFD700,stroke:#333,stroke-width:2px

    %% Click Events
    click Camera "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Camera/Camera.as"
    click Mouse "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Mouse/Mouse.as"
    click Commands "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Commands/CommandManager.as"
    click Actor "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Actor/Actor.as"
    click Gamemode "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Gamemodes/Manager/GamemodeManager.as"
    click Weapons "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Weapons/Gun.as"
    click Particles "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Particles/Particle.as"
    click Map "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Map/MapManager.as"
    click Collision "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Collision/Collision.as"
    click Loading "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Loading/Loading.as"
    click Object "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Object/Object.as"
    click Models "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Models/Model.as"
    click Animation "https://github.com/eps0003/hunter4d/tree/master/Hunter4D/Models/Animations"
    click Skins "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Skins/Skins.as"
    click Culling "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Culling/Tree.as"
    click Bounds "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Bounds/AABB.as"
    click Utils "https://github.com/eps0003/hunter4d/blob/master/Hunter4D/Utilities/Utilities.as"
```
