# matidragon-yt/dyos architecture

> Architecture diagram of the GitHub repository matidragon-yt/dyos, 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/matidragon-yt/dyos
- Repository: https://github.com/matidragon-yt/dyos

## Overview

##### Main Components
- Core Scripting Engine and Data Repository:
– Represent the main “src” directory that contains the detailed scripts. This includes submodules for actors, vehicles, objects, players, scenes, camera, game mechanics, and utilities.
– Inside “src”, each directory (e.g., actor, vehicle, player, scene) is a distinct module that handles specific game entity creation, editing, and behaviors.
- Platform Specific Implementations:
– PC and Android directories show adaptations and integration with the appropriate CLEO versions (CLEO4 for Android and CLEO5 for PC).
– Also show supporting files like “cleo” configuration files and separate folders under PC (GTA San Andreas User Files, etc) and Android (files/data/script).
- External Dependencies and Tools:
– Sanny Builder (as noted in the README) used for script compilation.
– CLEO libraries and corresponding configuration files.
– Language or localization files (“languages” folder with various translations, even if some are marked deprecated).

##### Detail the Relationships and Interactions
- Data Flow from the Core Engine to the Execution Environment:
– Illustrate how these components are compiled (using Sanny Builder) and then injected into the game via CLEO mods and associated script files in the “Android” and “PC” directories.
- Interaction Between Platform-Specific Modules:
– Indicate that the “PC” folder and “Android” folder are both consumers of the same core logic but configured differently (different script formats, configurations, file structures).
- Integration with External Tools:
– Include CLEO configurations that connect the compiled scripts with the actual game execution on each platform.
- Community and Extensibility:

##### Architectural Patterns and Design Principles
- Modularity:
– Emphasize that the “src” folder is organized with a modular approach – each directory representing a dedicated functionality (actor, vehicle, scene, etc).
- Separation of Concerns:
- Data-Driven Design:
– Note that many game elements (like animation data, object locations, and camera properties) are defined as text files. This indicates a design where runtime behavior is largely data-driven and easily modifiable.

##### Technologies, Frameworks, and Libraries
- Use of Sanny Builder for script compilation.
- CLEO libraries used for mod execution (CLEO5 for PC, CLEO4 for Android).
- Mention that the project uses simple text-based scripts and configuration files (e.g., *.txt, *.ini) for many of its operations.

##### Overall Detailed Representation
- Don’t shy away from being very detailed – break down the “src” module into its individual directories (actors, vehicles, objects, etc.), each shown as a smaller block within the “Core Scripting Engine” component.
- Similarly, for platform-specific parts, list sub-components if necessary (for example, under “PC” show the “CLEO” subfolder and “GTA San Andreas User Files” elements).
- Every major relationship (e.g., how the compiled script from Sanny Builder gets integrated into both Android and PC file structures) is clearly captured.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "External Tools and Dependencies"
        Sanny["Sanny Builder"]:::external
        CLEOConfig["CLEO Configurations"]:::external
        Languages["Localization Files"]:::external
    end

    subgraph "Core Scripting Engine (src)"
        CS["Core Scripting Engine"]:::core
        ACT["Actor Module"]:::core
        VEH["Vehicle Module"]:::core
        PLAY["Player Module"]:::core
        SCENE["Scene Module"]:::core
        CAM["Camera Module"]:::core
        GAME["Game Mechanics Module"]:::core
        UTILS["Utilities Module"]:::core
    end

    subgraph "Platform-Specific Adapters"
        subgraph "PC Adapter"
            PC["PC Adapter"]:::adapter
            PC_CLEO["CLEO Files"]:::adapter
            PC_User["GTA SA User Files"]:::adapter
        end
        subgraph "Android Adapter"
            ANDR["Android Adapter"]:::adapter
            ANDR_SCRIPTS["Script Files"]:::adapter
        end
    end

    %% Data Flow
    Sanny -->|"compiles"| CS
    CS -->|"integratesInto"| PC
    CS -->|"integratesInto"| ANDR
    PC -->|"manages"| PC_CLEO
    PC -->|"manages"| PC_User
    ANDR -->|"manages"| ANDR_SCRIPTS
    CLEOConfig -->|"configures"| PC
    CLEOConfig -->|"configures"| ANDR
    Languages --- Sanny

    %% Core Modules Composition
    CS --> ACT
    CS --> VEH
    CS --> PLAY
    CS --> SCENE
    CS --> CAM
    CS --> GAME
    CS --> UTILS

    %% Click Events
    click CS "https://github.com/matidragon-yt/dyos/tree/main/src"
    click ACT "https://github.com/matidragon-yt/dyos/tree/main/src/actor"
    click VEH "https://github.com/matidragon-yt/dyos/tree/main/src/vehicle"
    click PLAY "https://github.com/matidragon-yt/dyos/tree/main/src/player"
    click SCENE "https://github.com/matidragon-yt/dyos/tree/main/src/scene"
    click CAM "https://github.com/matidragon-yt/dyos/tree/main/src/camera"
    click GAME "https://github.com/matidragon-yt/dyos/tree/main/src/game"
    click UTILS "https://github.com/matidragon-yt/dyos/tree/main/src/utils"
    click PC "https://github.com/matidragon-yt/dyos/tree/main/PC"
    click PC_CLEO "https://github.com/matidragon-yt/dyos/tree/main/PC/CLEO"
    click PC_User "https://github.com/matidragon-yt/dyos/tree/main/PC/GTA San Andreas User Files"
    click ANDR "https://github.com/matidragon-yt/dyos/tree/main/Android"
    click ANDR_SCRIPTS "https://github.com/matidragon-yt/dyos/tree/main/Android/files/data/script"
    click CLEOConfig "https://github.com/matidragon-yt/dyos/blob/main/cleo/dyos.1.ini"
    click Languages "https://github.com/matidragon-yt/dyos/tree/main/languages"

    %% Styles
    classDef core fill:#f9f,stroke:#333,stroke-width:2px;
    classDef adapter fill:#bbf,stroke:#333,stroke-width:2px;
    classDef external fill:#cfc,stroke:#333,stroke-width:2px;
```
