# eazuooz/yamyam_engine architecture

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

- Interactive diagram: https://gitdiagram.com/eazuooz/yamyam_engine
- Repository: https://github.com/eazuooz/yamyam_engine

## Overview

##### And represent the main components
- Engine Core Subsystem – Represented by the YamYamEngine_SOURCE folder. This subsystem will include:
- Rendering Engine (yaRenderer, yaGraphicDevice_DX11, yaShader, yaMaterial, shader constant buffers and HLSL files)
- Audio System (yaFmod, yaAudioSource, yaAudioClip and integration of FMOD libraries from the External/Library/Fmod directory)
- Physics & Collision (yaCollider, yaCollisionManager, yaBoxCollider2D, yaCircleCollider2D, yaRigidbody)
- Scene & Entity Management (yaScene, yaSceneManager, yaEntity, yaComponent, yaGameObject)
- Input & Event Handling (yaInput, yaEventQueue, yaKeyEvent, yaMouseEvent)
- UI Subsystem (yaUIBase, yaUIButton, yaUIHUD, yaUIManager)
- Other utilities (yaMath, resource management modules)

- Editor and GUI Tools – Taken from Editor_SOURCE and Editor_Window:
- Editor GUI Elements (such as guiEditor, guiInspectorWindow, guiHierarchyWindow, guiGameWindow, guiTransform, etc.)
- ImGui-based components (imgui files including imgui_demo, imgui_impl_dx11, and imgui_impl_win32)
- Windowing components and additional editor functionality (Editor_Window main.cpp, framework.h)

- Shaders – Located in Shaders_SOURCE:
- HLSL shader programs (sprite and wireframe vertex/pixel shaders) and shared shader headers (ConstantBuffers.hlsli, Samplers.hlsli, Textures.hlsli)

- External Libraries:
- FMOD libraries and include files (for audio handling)

- Resources:
- Asset management including images and sound files, which the engine loads and uses during runtime.

##### Out the relationships and interactions
- Link the Audio System with External Libraries (FMOD), indicating dependency on those external libraries.
- That the Input, Event, and Scene Management modules interact to control game object behavior and UI updates.

##### Important design principles and patterns
- Modularity: Make sure each subsystem (Rendering, Audio, Physics, etc.) is clearly separated — this indicates adherence to separation of concerns.
- Component-Based Design: Within the engine, entities and game objects are handled in a component-oriented way (yaEntity, yaComponent, yaScript, etc.).
- Editor-Engine Decoupling: Although tightly integrated in this project, visually separate the editor modules from the engine core to clarify responsibilities.

##### Components you must include
▪ Engine Core (with submodules: Rendering, Audio, Physics, Scene/Entity, Input/Events, UI)
▪ Editor Tools (GUI, ImGui-based interfaces, Editor windows)
▪ Shaders (vertex and pixel shaders, shared shader headers)
▪ External Dependencies (FMOD and other libraries)
▪ Resources (images, sounds, textures)

## Diagram (Mermaid)

```mermaid
graph TD
    %% Engine Core Subsystem
    subgraph "Engine Core"
        ER("Rendering Engine (yaRenderer, yaGraphicDevice_DX11)"):::engine
        AU("Audio System (yaFmod etc.)"):::engine
        PH("Physics & Collision (yaBoxCollider2D, etc.)"):::engine
        SC("Scene & Entity Management (yaScene, yaSceneManager)"):::engine
        IE("Input & Event Handling (yaInput, yaKeyEvent, yaMouseEvent)"):::engine
        UI("UI Subsystem (yaUIBase, yaUIButton, yaUIHUD, yaUIManager)"):::engine
    end

    %% Editor Tools
    subgraph "Editor Tools"
        GC("GUI Components & ImGui Integration"):::editor
        EW("Editor Window & Functionality"):::editor
    end

    %% Shaders
    subgraph "Shaders"
        SH("HLSL Shader Programs & Shared Headers"):::shader
    end

    %% External Dependencies
    subgraph "External Dependencies"
        FM("FMOD Libraries & Includes"):::external
    end

    %% Resources
    subgraph "Resources"
        RS("Media Assets (Images, Sounds, etc.)"):::resources
    end

    %% Connections across subsystems
    SC -->|"sceneData"| ER
    IE -->|"control"| SC
    SC -->|"UIupdates"| UI
    ER -->|"shaderData"| SH
    AU -->|"audioLib"| FM

    GC -->|"editorControl"| SC
    EW -->|"editorControl"| SC

    RS -->|"textures"| ER
    RS -->|"audioAssets"| AU

    %% Styling Classes
    classDef engine fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef editor fill:#D5F5E3,stroke:#196F3D,stroke-width:2px;
    classDef shader fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef external fill:#FADBD8,stroke:#943126,stroke-width:2px;
    classDef resources fill:#FCF3CF,stroke:#7D6608,stroke-width:2px;

    %% Click Events for Component Mapping
    click ER "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaRenderer.cpp"
    click AU "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaFmod.cpp"
    click PH "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaBoxCollider2D.cpp"
    click SC "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaScene.cpp"
    click IE "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaInput.cpp"
    click UI "https://github.com/eazuooz/yamyam_engine/blob/master/YamYamEngine_SOURCE/yaUIBase.cpp"
    click GC "https://github.com/eazuooz/yamyam_engine/tree/master/Editor_SOURCE"
    click EW "https://github.com/eazuooz/yamyam_engine/blob/master/Editor_Window/main.cpp"
    click SH "https://github.com/eazuooz/yamyam_engine/tree/master/Shaders_SOURCE"
    click FM "https://github.com/eazuooz/yamyam_engine/tree/master/External/Library/Fmod"
    click RS "https://github.com/eazuooz/yamyam_engine/tree/master/Resources"
```
