# duhannk/oua-ai-game-jam architecture

> Architecture diagram of the GitHub repository duhannk/oua-ai-game-jam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/duhannk/oua-ai-game-jam
- Repository: https://github.com/duhannk/oua-ai-game-jam

## Overview

##### Project type and purpose
- This is a Unity-based game (organized under the “Skyfall” folder) created for an “OUA-AI-Game-Jam.”
- It integrates standard game components (Scenes, Prefabs, Scripts) with ML-Agents and ONNX models to drive AI behaviors, and relies on several third-party asset packs (ParticleProFX, Chibi Mummy, Low-Poly Mini Village, TextMesh Pro, UI Toolkit).

##### File structure
- Top level: “Skyfall” contains three critical areas:
- Assets/ – everything the engine consumes (2D UI, Audio, Models, Prefabs, Scenes, Scripts, ThirdPartyAssets, ML-Agents).
- Packages/ – Unity package manifest (including ML-Agents, code coverage tools).
- ProjectSettings/ – engine configuration (InputManager, GraphicsSettings, VFXManager, NetworkManager, etc.).
- Under Assets/[GAME]/Scripts you see clear modules:
- Ai/ – AI logic (AI_Chaser.cs).
- Controllers/ – player controls, NPC controllers.
- Managers/ – GameManager, MeteorManager, score and state orchestration.
- Helpers/ – utility scripts (timers, mesh destroyers, score manager).
- UI/ – menu and HUD controllers.
- Audio/ – centralized audio API.
- Under Assets/[GAME]/Models you find ONNX files (pretrained ML models). Under Assets/ML-Agents you find timer definitions.
- ThirdPartyAssets folder holds visual and particle effect packs integrated into the Scenes via Prefabs and Materials.

##### Detail
- Configuration files (ProjectSettings/InputManager, Packages/manifest.json).
- How Scenes load Prefabs that reference Scripts and Assets.
- ML-Agents flow: Timers JSON → ML Agent → ONNX model → script.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Engine Subsystems
    subgraph "Unity Engine Subsystems"
        Input["Input Subsystem"]:::engine
        Physics["Physics (2D)"]:::engine
        Rendering["Rendering & VFX"]:::engine
        AudioSys["Audio Subsystem"]:::engine
        UISys["UI Subsystem"]:::engine
        ML["ML/AI Subsystem"]:::engine
    end

    %% Script Modules
    subgraph "Game Logic Modules"
        Controllers["Controllers"]:::logic
        Managers["Managers"]:::logic
        Helpers["Helpers"]:::logic
        AIModule["AI Module"]:::logic
        DomainObjs["Domain Objects"]:::logic
    end

    %% Assets Pipeline
    subgraph "Assets Pipeline"
        Scenes["Scenes"]:::asset
        Prefabs["Prefabs"]:::asset
        Models["ONNX Models"]:::asset
        Materials["Materials & Textures"]:::asset
    end

    %% Third-Party
    subgraph "Third-Party Assets"
        ParticleProFX["ParticleProFX"]:::third
        LowPolyVillage["Low-Poly Mini Village"]:::third
        ChibiMummy["Chibi Mummy"]:::third
        TextMeshPro["TextMesh Pro & UI Toolkit"]:::third
    end

    %% Engine interactions
    Input -->|provides input| Controllers
    Controllers -->|updates state| Managers
    Managers -->|orchestrates| Prefabs
    Managers -->|triggers| Rendering
    Managers -->|plays SFX| AudioSys
    Managers -->|updates HUD| UISys
    Rendering -->|uses| Materials
    Rendering -->|uses| ParticleProFX
    UISys -->|uses| TextMeshPro
    ML -->|loads timers| AIModule
    AIModule -->|queries| Models
    AIModule -->|returns actions| Controllers
    Physics -->|interacts with| Prefabs
    Helpers -->|utility| Managers
    Helpers -->|utility| Controllers

    %% Assets pipeline refs
    Scenes -->|instantiate| Prefabs
    Prefabs -->|attach scripts| Controllers

    %% Third-party integrations
    ParticleProFX -->|VFX assets| Rendering
    LowPolyVillage -->|art & meshes| Rendering
    ChibiMummy -->|models & scripts| Rendering
    TextMeshPro -->|UI assets| UISys

    %% Click Events
    click Input "https://github.com/duhannk/oua-ai-game-jam/blob/main/ProjectSettings/InputManager.asset"
    click Controllers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Controllers/FirstPersonController.cs"
    click Controllers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Controllers/PlayerHealthController.cs"
    click Controllers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Controllers/PlayerShooting.cs"
    click Controllers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Controllers/ZombieController.cs"
    click AIModule "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Ai/AI_Chaser.cs"
    click Managers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Managers/GameManager.cs"
    click Managers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Managers/MeteorManager.cs"
    click Helpers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Helpers/CricleTimer.cs"
    click Helpers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Helpers/DestroyedPartsParent.cs"
    click Helpers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Helpers/MeshDestroy.cs"
    click Helpers "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Helpers/Score Manager.cs"
    click DomainObjs "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Objects/Meteor.cs"
    click Scenes "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/[GAME]/Scenes"
    click Prefabs "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/[GAME]/Prefabs"
    click Models "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Models/Calısan_Modeller/*.onnx"
    click Models "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Models/Calısmayan_Modeller/*.onnx"
    click Materials "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Graphics/Materials/*.mat"
    click ParticleProFX "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/[GAME]/ThirdPartyAssets/ParticleProFX"
    click LowPolyVillage "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/[GAME]/ThirdPartyAssets/Low_Poly_Mini_Village"
    click ChibiMummy "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/[GAME]/ThirdPartyAssets/Chibi Mummy"
    click AudioSys "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/Audio/Audio.cs"
    click AudioSys "https://github.com/duhannk/oua-ai-game-jam/blob/main/ProjectSettings/AudioManager.asset"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/UI/PanelController.cs"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/UI/PlayButton.cs"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/UI/QuitButton.cs"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/[GAME]/Scripts/UI/RestartButton.cs"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/2D Casual UI"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/UI Toolkit"
    click UISys "https://github.com/duhannk/oua-ai-game-jam/tree/main/Skyfall/Assets/TextMesh Pro"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/ML-Agents/Timers/Demo_timers.json"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/ML-Agents/Timers/GameStartUI_timers.json"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Assets/ML-Agents/Timers/Level_timers.json"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Packages/manifest.json"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/Packages/packages-lock.json"
    click ML "https://github.com/duhannk/oua-ai-game-jam/blob/main/Skyfall/ProjectSettings/GraphicsSettings.asset"

    %% Styles
    classDef engine fill:#D0E8FF,stroke:#009,stroke-width:1px;
    classDef logic fill:#DFFFE0,stroke:#090,stroke-width:1px;
    classDef asset fill:#FFE8C8,stroke:#E90,stroke-width:1px;
    classDef third fill:#F3D1FF,stroke:#909,stroke-width:1px;
```
