# alexandregaudencio/tcp_v-xikunahati architecture

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

- Interactive diagram: https://gitdiagram.com/alexandregaudencio/tcp_v-xikunahati
- Repository: https://github.com/alexandregaudencio/tcp_v-xikunahati

## Overview

##### Project Type and Purpose
- This is a Unity-based full-game project (“Xikunahati” theme as per the cover art), built using the Unity Editor. It comprises scene files, 3D/2D assets, physics and audio data, and C# scripts that implement game logic, character state machines, UI, and core game loop.

##### File-Structure Analysis
- Top-level “Assets” folder contains:
- subfolders for art packages (Ale, Aligned Games, LowPolyTropicalEnvironment, etc.)
- “Plugins”—third-party frameworks (DOTween, SerializedCollections), “LeanTween”
- “TextMesh Pro” and other packages under Packages/ and ProjectSettings/
- Scripts are organized by domain:
- Character/**StateMachine** (states: Idle, Jump, Dive, etc.)
- Control (PlayerInput, AIControl)
- CoreLoop (game state controller, scoring, timer)
- UI (ScoreBoard, ButtonControl, StateControl)
- level (Ball physics, TrajectoryPredictor, LevelLoader)
- Configuration/data via ScriptableObjects (.asset) for character properties, scores, timer settings.

##### Elements
- Green for your game logic domains (Character, CoreLoop)
- Orange for UI & Audio
- Gray for third-party plugins

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Subgraphs
    subgraph "Unity Runtime & Scenes"
        UR["Unity Engine"]:::unitysub
        GS["GameScene.unity"]:::unitysub
        MS["MenuScene.unity"]:::unitysub
    end

    subgraph "Input Subsystem"
        CI["ControlConfiguration.inputactions"]:::data
        PI["PlayerInput.cs"]:::logic
        IB["InputBuffer.cs"]:::logic
    end

    subgraph "Control Layer"
        PCH["PlayerControlHandler.cs"]:::logic
        PC["PlayerControl.cs"]:::logic
        AIC["AIControl.cs"]:::logic
        CC["CharacterControl.cs"]:::logic
    end

    subgraph "Character Layer"
        CB["CharacterBehaviour.cs"]:::logic
        CA["CharacterAnimation.cs"]:::logic
        CP["CharacterProperties.cs"]:::logic
        CH["CharacterHeadControl.cs"]:::logic
        CPart["CharacterParticle.cs"]:::logic
        subgraph "StateMachine"
            PSM["PlayerStateMachine.cs"]:::logic
            StateBase["State.cs"]:::logic
            SStates["States/*.cs"]:::logic
        end
    end

    subgraph "Level & Physics"
        BC["BallController.cs"]:::logic
        BNC["Bounce.cs"]:::logic
        TP["TrajectoryPredictor.cs"]:::logic
        TBD["ThrowBallData.cs"]:::logic
        LSC["SoundControl.cs"]:::logic
        LL["LevelLoader.cs"]:::logic
        SP["ServerPositions.cs"]:::logic
        PCtrl["PriorityControl.cs"]:::logic
    end

    subgraph "Core Game Loop"
        GSC["GameStateController.cs"]:::logic
        SCR["Scoring.cs"]:::logic
        SRV["Serve.cs"]:::logic
        EG["EndGame.cs"]:::logic
        TM["TimerManager.cs"]:::logic
        CLC["CoreLoopController.cs"]:::logic
    end

    subgraph "UI Layer"
        SB["ScoreBoard.cs"]:::ui
        BCtl["ButtonControl.cs"]:::ui
        SC["StateControl.cs"]:::ui
        UEG["UIEndGame.cs"]:::ui
        ISB["InterfaceSoundButtonControl.cs"]:::ui
        SCfg["SoundConfigure.cs"]:::ui
    end

    subgraph "Audio Layer"
        CSC["CharacterSoundControl.cs"]:::ui
        BSC["SoundControl.cs"]:::ui
        SAssets["Audio Assets"]:::ui
    end

    subgraph "Plugin Services"
        DOT["DOTween"]:::plugin
        LT["LeanTween"]:::plugin
        SColl["SerializedCollections"]:::plugin
        TMP["TextMesh Pro"]:::plugin
    end

    subgraph "ScriptableObject Data"
        CPropAsset["CharacterProperties.asset"]:::data
        BlueScore["BlueTeamScore.asset"]:::data
        RedScore["RedTeamScore.asset"]:::data
    end

    %% Connections
    UR --> GS
    UR --> MS

    GS -->|"User Input"| CI
    MS -->|"User Input"| CI

    CI -->|"input events"| PI
    PI -->|"buffers"| IB
    IB -->|"commands"| PCH

    PCH -->|"control signals"| CC
    CC -->|"commands"| CB
    AIC --> CB

    CB --> CA
    CB --> CP
    CB --> CH
    CB --> CPart
    CA -->|"anim updates"| UR
    CB --> StateBase
    StateBase --> PSM
    PSM --> SStates

    CB --> BC
    BC --> BNC
    BC --> TP
    BC --> TBD

    BNC --> UR
    TP --> UR

    UR -->|"collision events"| GSC
    GSC --> SCR
    SCR --> SB
    GSC --> TM
    TM --> SB
    SRV --> GSC
    EG --> GSC

    GSC -->|"scene transitions"| GS
    GSC --> MS

    GSC --> CSC
    CB --> CSC

    SB --> DOT
    BCtl --> LT
    SC --> TMP
    CSC --> SColl

    CP --> CPropAsset
    BC --> BlueScore
    BC --> RedScore

    %% Click Events
    click GS "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Scenes/GameScene.unity"
    click MS "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Scenes/MenuScene.unity"
    click CI "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Recursos/controller/ControlConfiguration.inputactions"
    click PI "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/PlayerInput.cs"
    click IB "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/InputBuffer.cs"
    click PCH "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/PlayerControlHandler.cs"
    click PC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/PlayerControl.cs"
    click AIC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/AIControl.cs"
    click CC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Control/CharacterControl.cs"
    click CB "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/CharacterBehaviour.cs"
    click CA "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/CharacterAnimation.cs"
    click CP "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/CharacterProperties.cs"
    click CH "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/CharacterHeadControl.cs"
    click CPart "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/CharacterParticle.cs"
    click PSM "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/StateMchine/PlayerStateMachine.cs"
    click StateBase "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/StateMchine/State.cs"
    click SStates "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/Game/Script/Character/StateMchine/States"
    click BC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Ball/BallController.cs"
    click BNC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Ball/Bounce.cs"
    click TP "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Ball/TrajectoryPredictor.cs"
    click TBD "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Ball/ThrowBallData.cs"
    click LSC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Ball/SoundControl.cs"
    click LL "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/LevelLoader.cs"
    click SP "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/ServerPositions.cs"
    click PCtrl "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/Area/PriorityControl.cs"
    click GSC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/GameStateController.cs"
    click SCR "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/Scoring.cs"
    click SRV "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/Serve.cs"
    click EG "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/EndGame.cs"
    click TM "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/Timer/TimerManager.cs"
    click CLC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/CoreLoop/CoreLoopController.cs"
    click SB "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/ScoreBoard.cs"
    click BCtl "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/ButtonControl.cs"
    click SC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/StateControl.cs"
    click UEG "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/UIEndGame.cs"
    click ISB "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/InterfaceSoundButtonControl.cs"
    click SCfg "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/UI/SoundConfigure.cs"
    click CSC "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/Complement/CharacterSoundControl.cs"
    click SAssets "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/Game/Recursos/sound"
    click DOT "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/Plugins/Demigiant/DOTween"
    click LT "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/LeanTween/Framework"
    click SColl "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/Plugins/SerializedCollections"
    click TMP "https://github.com/alexandregaudencio/tcp_v-xikunahati/tree/main/Assets/TextMesh Pro"
    click CPropAsset "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/Character/Character properties.asset"
    click BlueScore "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/team/BlueTeamScore.asset"
    click RedScore "https://github.com/alexandregaudencio/tcp_v-xikunahati/blob/main/Assets/Game/Script/level/team/RedTeamScore.asset"

    %% Styles
    classDef unitysub fill:#bbdefb,stroke:#1976d2,color:#0d47a1
    classDef logic fill:#c8e6c9,stroke:#388e3c,color:#1b5e20
    classDef ui fill:#ffe0b2,stroke:#f57c00,color:#e65100
    classDef plugin fill:#eeeeee,stroke:#9e9e9e,color:#424242
    classDef data fill:#fff9c4,stroke:#f9a825,color:#f57f17
```
