# ionutcava/divide-framework architecture

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

- Interactive diagram: https://gitdiagram.com/ionutcava/divide-framework
- Repository: https://github.com/ionutcava/divide-framework

## Overview

##### Project type and purpose
- This is a C++‐based real­time graphics/game framework (“Divide-Framework”), comprising:
- An engine core (application loop, resource management, math, multithreading)
- Rendering backends (OpenGL/AZDO, experimental Vulkan)
- Subsystems: ECS, physics (PhysX/Jolt), AI, audio, input, networking, scripting (ChaiScript), UI (CEGUI, ImGui), terrain/vegetation, scene management, editor
- Tools: ProjectManager, editor UI, hot-reloading, unit tests
- It’s intended as a learning/experimental engine for prototyping and shipping small games.

##### File structure
- Top-level directories:
- Source/: contains all engine modules, organized by domain (Core, ECS, Rendering, Physics, AI, GUI, etc.)
- Assets/: audio, models, textures, scripts, shaders for demos
- Projects/, SaveData/, Screenshots/: sample scenes and run-time data
- ToolConfig/: IDE and debugger settings
- ThirdParty/: integrated libraries (EASTL, SDL, physics, ECS, ImGui, etc.)
- CMakeLists.txt & CMakePresets.json: build configuration
- Architectural patterns:
- Layered architecture: Platform → Core → Subsystems → Application
- Entity-Component-System (ECS) pattern
- Plugin-style render backends interchangeable at build or run time
- Modular subsystems (audio, physics, AI, etc.) communicating via well-defined interfaces

##### README for additional insights
- Confirms use of C++17/20, learning focus, OpenGL 4.6 AZDO, Vulkan 1.3
- Mentions editor and project manager UI, hot-reloading support
- Lists third-party dependencies and purpose

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Platform Abstraction Layer
    subgraph "Platform Abstraction"
        PlatformAbstraction["Platform Abstraction"]:::platform
        AudioWrapper["Audio API Wrapper"]:::platform
        VideoWrapper["Video API Wrapper"]:::platform
        OpenGL["OpenGL Backend"]:::platform
        Vulkan["Vulkan Backend"]:::platform
        InputSub["Input Subsystem"]:::platform
        AudioSub["Audio Subsystem"]:::platform
    end

    %% Engine Core Layer
    subgraph "Engine Core"
        EngineCore["Engine Core"]:::core
        MainLoop["Application Loop"]:::core
        ResourceMgr["Resource Manager"]:::core
        TaskPool["Task Pool"]:::core
        Console["Configuration & Console"]:::core
    end

    %% Subsystems Layer
    subgraph "Subsystems"
        ECS["ECS Manager"]:::subsystem
        Rendering["Rendering Subsystem"]:::subsystem
        Physics["Physics Subsystem"]:::subsystem
        PhysX["PhysX Backend"]:::subsystem
        Jolt["Jolt Backend"]:::subsystem
        NonePhysics["Stub Backend"]:::subsystem
        AI["AI Subsystem"]:::subsystem
        Networking["Networking Subsystem"]:::subsystem
        Scripting["Scripting Subsystem"]:::subsystem
        GUI["UI Subsystem"]:::ui
        CEGUI["CEGUI Addons"]:::ui
        Terrain["Terrain"]:::env
        Vegetation["Vegetation"]:::env
        Water["Water"]:::env
        Sky["Sky"]:::env
        Scenes["Scene Management"]:::subsystem
        DefaultScene["Default Scene"]:::subsystem
        WarScene["War Scene"]:::subsystem
    end

    %% Tools & Editor Layer
    subgraph "Tools & Editor"
        Editor["Editor UI"]:::tools
        ProjectManager["Project Manager"]:::tools
        HotReloading["Hot-Reloading"]:::tools
        UnitTests["Unit Tests"]:::tools
    end

    %% Third-Party & Config
    ThirdParty["Third-Party Libs"]:::thirdparty
    CMakeHelpers["CMake & Config Helpers"]:::thirdparty

    %% Relationships
    PlatformAbstraction --> EngineCore
    AudioWrapper --> PlatformAbstraction
    VideoWrapper --> PlatformAbstraction
    OpenGL --> VideoWrapper
    Vulkan --> VideoWrapper
    InputSub --> PlatformAbstraction
    AudioSub --> PlatformAbstraction

    EngineCore --> MainLoop
    EngineCore --> ResourceMgr
    EngineCore --> TaskPool
    EngineCore --> Console

    MainLoop --> ECS
    MainLoop --> Rendering
    MainLoop --> Physics
    MainLoop --> AI
    MainLoop --> Networking
    MainLoop --> Scripting
    MainLoop --> GUI

    ResourceMgr --> ECS
    ResourceMgr --> Rendering
    ResourceMgr --> Scripting

    ECS --> Physics
    ECS --> AI
    ECS --> Rendering
    ECS --> Networking
    ECS --> AudioSub
    ECS --> InputSub

    Physics --> PhysX
    Physics --> Jolt
    Physics --> NonePhysics

    Rendering --> VideoWrapper
    Rendering --> ResourceMgr

    GUI --> Rendering
    CEGUI --> GUI

    Scenes --> ECS
    DefaultScene --> Scenes
    WarScene --> Scenes

    Editor --> ECS
    Editor --> Scenes
    ProjectManager --> EngineCore
    HotReloading --> ResourceMgr
    UnitTests --> EngineCore

    EngineCore --> ThirdParty
    EngineCore --> CMakeHelpers

    %% Click Events
    click PlatformAbstraction "https://github.com/ionutcava/divide-framework/tree/master/Source/Platform"
    click EngineCore "https://github.com/ionutcava/divide-framework/tree/master/Source/Core"
    click Rendering "https://github.com/ionutcava/divide-framework/tree/master/Source/Rendering"
    click OpenGL "https://github.com/ionutcava/divide-framework/tree/master/Source/Platform/Video/RenderBackend/OpenGL"
    click Vulkan "https://github.com/ionutcava/divide-framework/tree/master/Source/Platform/Video/RenderBackend/Vulkan"
    click ECS "https://github.com/ionutcava/divide-framework/tree/master/Source/ECS"
    click Physics "https://github.com/ionutcava/divide-framework/tree/master/Source/Physics"
    click PhysX "https://github.com/ionutcava/divide-framework/tree/master/Source/Physics/PhysX"
    click Jolt "https://github.com/ionutcava/divide-framework/tree/master/Source/Physics/Jolt"
    click NonePhysics "https://github.com/ionutcava/divide-framework/tree/master/Source/Physics/None"
    click AI "https://github.com/ionutcava/divide-framework/tree/master/Source/AI"
    click AudioSub "https://github.com/ionutcava/divide-framework/tree/master/Source/Platform/Audio"
    click InputSub "https://github.com/ionutcava/divide-framework/tree/master/Source/Platform/Input"
    click Networking "https://github.com/ionutcava/divide-framework/tree/master/Source/Networking"
    click Scripting "https://github.com/ionutcava/divide-framework/tree/master/Source/Scripting"
    click GUI "https://github.com/ionutcava/divide-framework/tree/master/Source/GUI"
    click CEGUI "https://github.com/ionutcava/divide-framework/tree/master/Source/GUI/CEGUIAddons"
    click Terrain "https://github.com/ionutcava/divide-framework/tree/master/Source/Environment/Terrain"
    click Vegetation "https://github.com/ionutcava/divide-framework/tree/master/Source/Environment/Vegetation"
    click Water "https://github.com/ionutcava/divide-framework/tree/master/Source/Environment/Water"
    click Sky "https://github.com/ionutcava/divide-framework/tree/master/Source/Environment/Sky"
    click Scenes "https://github.com/ionutcava/divide-framework/tree/master/Source/Scenes"
    click DefaultScene "https://github.com/ionutcava/divide-framework/tree/master/Source/Scenes/DefaultScene"
    click WarScene "https://github.com/ionutcava/divide-framework/tree/master/Source/Scenes/WarScene"
    click Editor "https://github.com/ionutcava/divide-framework/tree/master/Source/Editor"
    click ProjectManager "https://github.com/ionutcava/divide-framework/tree/master/Source/ProjectManager"
    click HotReloading "https://github.com/ionutcava/divide-framework/tree/master/Source/Executable/HotReloading"
    click UnitTests "https://github.com/ionutcava/divide-framework/tree/master/Source/UnitTests"
    click ThirdParty "https://github.com/ionutcava/divide-framework/tree/master/Source/ThirdParty"
    click CMakeHelpers "https://github.com/ionutcava/divide-framework/tree/master/Source/CMakeHelpers"

    %% Styles
    classDef platform fill:#888888,stroke:#333,stroke-width:1px;
    classDef core fill:#88aaff,stroke:#333,stroke-width:1px;
    classDef subsystem fill:#88dd88,stroke:#333,stroke-width:1px;
    classDef tools fill:#ffcc88,stroke:#333,stroke-width:1px;
    classDef ui fill:#ff8888,stroke:#333,stroke-width:1px;
    classDef env fill:#ccffcc,stroke:#333,stroke-width:1px;
    classDef thirdparty fill:#d8bfff,stroke:#333,stroke-width:1px;
```
