# daryedev/langosta architecture

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

- Interactive diagram: https://gitdiagram.com/daryedev/langosta
- Repository: https://github.com/daryedev/langosta

## Overview

##### Layer Organization (Top to Bottom)

Layer 1: Client/Server Architecture
- Server Viewport
- Viewer Viewport
- Multiplayer Synchronization

Layer 2: Core Game Systems
- VR Player Controller
- Weapon Manager
- Block Manager
- Modifier System

Layer 3: Game World
- Environment
- Physics
- Spawners
- Audio

##### Key Components to Highlight

a. VR Integration
- XR Tools integration
- Controller Input Handlers
- VR Player Controller

b. Multiplayer Architecture
- Server/Client communication
- Sync system
- Player spawning

c. Weapon System
- Weapon Manager
- Individual weapons
- Damage system

d. Building System
- Block Manager
- Block types
- Building mechanics

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef core fill:#a5d8ff,stroke:#0077cc
    classDef module fill:#98FB98,stroke:#228B22
    classDef support fill:#FFB6C1,stroke:#FF69B4
    classDef network fill:#DDA0DD,stroke:#9370DB
    classDef environment fill:#F0E68C,stroke:#DAA520
    classDef weapon fill:#FF6B6B,stroke:#CD5C5C
    classDef building fill:#87CEEB,stroke:#4682B4
    classDef player fill:#FFA07A,stroke:#FF7F50
    classDef audio fill:#E6E6FA,stroke:#8B8BCD
    classDef input fill:#F0FFF0,stroke:#98FB98

    %% Layer 1: Client/Server Architecture
    subgraph Architecture
        Server[Server Viewport]:::network
        Client[Client Viewport]:::network
        Sync[Multiplayer Sync]:::network
    end

    %% Layer 2: Core Game Systems
    subgraph CoreSystems
        VR[VR System]:::core
        Weapon[Weapon System]:::weapon
        Building[Building System]:::building
        Modifier[Modifier System]:::support
        Player[Player System]:::player
    end

    %% Layer 3: Game World
    subgraph GameWorld
        Env[Environment System]:::environment
        Physics[Physics & Collision]:::module
        Spawn[Spawn System]:::support
        Audio[Audio System]:::audio
    end

    %% Supporting Systems
    Resource[Resource Management]:::support
    UI[UI/HUD]:::support
    Input[Input Handling]:::input

    %% Connections
    Server --> Sync
    Client --> Sync
    Sync --> Player
    VR --> Player
    Player --> Weapon
    Player --> Building
    Building --> Physics
    Weapon --> Physics
    Modifier --> Player
    Modifier --> Weapon
    Spawn --> Player
    Physics --> Env
    Audio --> Player
    Input --> VR
    Input --> Player

    %% Click Events
    click VR "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/VRPlayerController/VRPlayerController.tscn"
    click Weapon "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/guns/WeaponManager.tscn"
    click Building "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/building/BlockManager/BlockManager.tscn"
    click Player "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/player_new.tscn"
    click Sync "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/multiplayer.tscn"
    click Spawn "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/SpawnArea.tscn"
    click Modifier "https://github.com/DaryeDev/langosta/tree/main/scenes/modules/Modifiers"
    click Env "https://github.com/DaryeDev/langosta/tree/main/scenes/world/lights and environment"
    click Audio "https://github.com/DaryeDev/langosta/tree/main/sounds"
    click Input "https://github.com/DaryeDev/langosta/blob/main/scenes/modules/VRPlayerController/LeftControllerInputHandler.gd"

    %% Legend
    subgraph Legend
        L1[Core Systems]:::core
        L2[Game Modules]:::module
        L3[Supporting Systems]:::support
        L4[Network Components]:::network
        L5[Environment]:::environment
        L6[Weapon Systems]:::weapon
        L7[Building Systems]:::building
        L8[Player Systems]:::player
        L9[Audio Systems]:::audio
        L10[Input Systems]:::input
    end
```
