# zhulibo/biochemicalarena architecture

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

- Interactive diagram: https://gitdiagram.com/zhulibo/biochemicalarena
- Repository: https://github.com/zhulibo/biochemicalarena

## Overview

##### Main Project Identification
- Type/Purpose: A networked, multiplayer FPS game focused on mutation gameplay.

##### Key Components
- Game Systems:
- Characters: Include characters (both human and mutant). This module also incorporates animations (HumanAnimInstance, MutantAnimInstance) and character components (combat, recoil, crosshair, etc.).
- Equipments: Group all equipment-related code such as weapons, melee items, projectiles, pickups, and equipment data. Differentiate between the “data” and “runtime” implementations.
- Player Controllers/Player States: Illustrate the control flow from input to game responses. Different controllers cater to different game modes (login, melee, mutation, team-based).
- System/Subsystems: This includes asset management, configuration storage, EOS (likely for online services), multi-culture, and player subsystems. Represent these as system services that support the main logic.
- UI (User Interface): Cover all UI-related modules (HUD, menus, notifications, shop, settings, server list, text chat). Show that UI components interact both with game state information and provide player input.
- Editor Integration: Since there is an “Editor” directory, note that some components extend the Unreal Editor for custom tooling (for instance, “Editor/Private” and “Editor/Public”) to support design-time functionality.

##### Relationships and Interactions
- That the Player Controllers receive input and then influence both the Game State and Character modules.
- Abilities module to Characters since abilities (animations, cues) affect character behavior.
- How the Equipments module integrates with both Characters and Game Modes.
- Link UI components to various subsystems (game state, controllers) to reflect real-time updates.
- Dependency from all these modules back to the core System/Subsystems (asset management, storage, online services) that provide essential runtime support.
- Architectural Patterns:
- Separation of concerns (e.g., gameplay logic vs. UI, and game state vs. visual representation).
- Interaction via the Unreal Engine’s component-based design, especially in the Characters and Abilities modules.

a. A container labeled “Unreal Engine Framework.”
– Core Game Systems: Abilities, Characters, Equipments.
– Game Modes and Logic: Game Modes/Game States, Player Controllers/States.
– Supporting Systems: System/Subsystems (Asset, Storage, EOS, etc.).
– Frontend/UI: HUD, Menus, Notifications, etc.
– Editor Tools (optional, but note the custom editor extension).
d. Adding notes on external services if applicable (like online services via EOS).
e. Use annotations to mention key design patterns, such as “Component-Based Architecture” (present in Unreal) or separation between game logic and UI.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Unreal Engine Framework and Supporting Systems
    subgraph "Unreal Engine Framework"
        UE1("Project File"):::engine
        UE2("Engine Config"):::engine
    end

    subgraph "Supporting Systems"
        SYS("System/Subsystems"):::support
    end

    %% Core Game Systems
    subgraph "Core Game Systems"
        AB("Abilities"):::gameplay
        CH("Characters"):::gameplay
        EQ("Equipments"):::gameplay
    end

    %% Game Modes and Controllers
    subgraph "Game Modes & Controllers"
        GM("Game Modes"):::mode
        GS("Game States"):::mode
        PC("Player Controllers"):::mode
        PS("Player States"):::mode
    end

    %% Frontend/UI and Editor Tools
    subgraph "Frontend/UI & Editor"
        UI("UI"):::ui
        ED("Editor Tools"):::editor
    end

    %% Relationships from Unreal Engine Framework to Core Systems and Modes
    UE1 -->|supports| AB
    UE1 -->|supports| CH
    UE1 -->|supports| EQ
    UE1 -->|supports| GM
    UE1 -->|supports| GS
    UE1 -->|supports| PC
    UE1 -->|supports| PS

    UE2 -->|configures| AB
    UE2 -->|configures| CH
    UE2 -->|configures| EQ
    UE2 -->|configures| GM
    UE2 -->|configures| GS
    UE2 -->|configures| PC
    UE2 -->|configures| PS
    ED -->|extends| UE2

    %% Relationships within Core Game Systems
    AB -->|"affects"| CH
    AB -->|"triggers"| UI
    EQ -->|"integrates with"| CH
    EQ -->|"influences"| GM
    SYS -->|"supports"| CH
    SYS -->|"supports"| EQ

    %% Relationships between Game Modes & Controllers
    PC -->|"inputs"| CH
    PC -->|"triggers"| GM
    GM -->|"manages"| GS

    %% UI interactions
    UI -->|"updates"| GM
    UI -->|"receives"| PC

    %% Click Events
    click UE1 "https://github.com/zhulibo/biochemicalarena/blob/main/BiochemicalArena.uproject"
    click UE2 "https://github.com/zhulibo/biochemicalarena/blob/main/Config/DefaultEngine.ini"
    click AB "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/Abilities"
    click CH "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/Characters"
    click EQ "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/Equipments"
    click GM "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/GameModes"
    click GS "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/GameStates"
    click PC "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/PlayerControllers"
    click PS "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/PlayerStates"
    click SYS "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/System"
    click UI "https://github.com/zhulibo/biochemicalarena/tree/main/Source/BiochemicalArena/UI"
    click ED "https://github.com/zhulibo/biochemicalarena/tree/main/Source/Editor"

    %% Styles
    classDef engine fill:#FAD7A0,stroke:#D35400,stroke-width:2px;
    classDef gameplay fill:#AED6F1,stroke:#2874A6,stroke-width:2px;
    classDef mode fill:#A9DFBF,stroke:#1E8449,stroke-width:2px;
    classDef support fill:#D7BDE2,stroke:#6C3483,stroke-width:2px;
    classDef ui fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
    classDef editor fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
```
