# isadorasophia/murder architecture

> Architecture diagram of the GitHub repository isadorasophia/murder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/isadorasophia/murder
- Repository: https://github.com/isadorasophia/murder

## Overview

##### Main Architectural Components

a) Core Engine Layer:
- ECS Framework (Bang)
- Graphics System (FNA-based)
- Input System
- Physics System
- Sound System
- Asset Management

b) Editor Layer:
- World Editor
- Dialogue System
- Particle Editor
- Sound Editor
- Asset Management Tools

##### Component Relationships

**[Game Layer]**
- ↑
**[Core Engine]**
- ↑
**[Editor Tools] ← [Asset Pipeline]**

##### Detailed Breakdown

a) Core Systems (src/Murder):
- Components/ (Entity components)
- Systems/ (Game logic systems)
- Core/ (Core engine functionality)
- Services/ (Shared services)
- Assets/ (Asset management)

b) Editor Systems (src/Murder.Editor):
- CustomEditors/ (Editor UI)
- Systems/ (Editor-specific systems)
- Data/ (Editor data management)

##### Key Design Elements

- Rectangles: Core systems
- Rounded rectangles: Services
- Hexagons: External dependencies
- Diamonds: Asset processors

- Blue: Core engine components
- Green: Editor components
- Yellow: Asset pipeline
- Gray: External dependencies

##### Specific Implementation Details

Key relationships:
**[Asset Pipeline]**
- ↓
**[Resource Management] → [Runtime Systems]**
- ↓
**[ECS Core] ← [Components] → [Systems]**

##### Integration Points

Highlight:
- FNA Graphics Integration
- Bang ECS Framework
- Asset Processing Pipeline
- Editor Tools Integration

##### Data Flow

Illustrate:
**[Resources] → [Asset Pipeline] → [Packed Assets]**
- ↓
**[Editor] → [World Data] → [Runtime Engine]**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Legend
        L1[Core System]:::core
        L2([Service]):::service
        L3{{External Dependency}}:::external
        L4[[Asset Processor]]:::asset
        L5[/Editor Tool/]:::editor
    end

    subgraph "Game Layer"
        GameRuntime[Game Runtime]:::core
    end

    subgraph "Core Engine Layer"
        direction TB
        CoreSystems{"Core Systems"}:::core
        
        subgraph "Core Components"
            Graphics["Graphics System"]:::core
            Input["Input System"]:::core
            Physics["Physics System"]:::core
            Sound["Sound System"]:::core
            AssetMgmt["Asset Management"]:::core
        end

        subgraph "ECS Framework"
            ECSCore["ECS Core"]:::core
            Components["Components"]:::core
            Systems["Systems"]:::core
        end

        subgraph "Services"
            GameServices(["Game Services"]):::service
            EntitySystem(["Entity System"]):::service
        end

        FNA{{FNA Framework}}:::external
    end

    subgraph "Editor Layer"
        direction TB
        EditorTools[/"Editor Tools"/]:::editor
        WorldEditor[/"World Editor"/]:::editor
        DialogueEditor[/"Dialogue System Editor"/]:::editor
        ParticleEditor[/"Particle Editor"/]:::editor
        SoundEditor[/"Sound Editor"/]:::editor
    end

    subgraph "Asset Pipeline"
        AssetProcessor[[Asset Processor]]:::asset
        ResourceMgmt[[Resource Management]]:::asset
        PackedAssets[[Packed Assets]]:::asset
    end

    %% Relationships
    GameRuntime --> CoreSystems
    CoreSystems --> FNA
    CoreSystems --> Graphics & Input & Physics & Sound & AssetMgmt
    ECSCore --> Components & Systems
    Components & Systems --> GameServices
    EditorTools --> AssetProcessor
    AssetProcessor --> ResourceMgmt
    ResourceMgmt --> PackedAssets
    PackedAssets --> AssetMgmt
    WorldEditor & DialogueEditor & ParticleEditor & SoundEditor --> EditorTools

    %% Click events
    click Graphics "https://github.com/isadorasophia/murder/tree/main/src/Murder/Core/Graphics/"
    click Input "https://github.com/isadorasophia/murder/tree/main/src/Murder/Core/Input/"
    click Physics "https://github.com/isadorasophia/murder/tree/main/src/Murder/Core/Physics/"
    click Sound "https://github.com/isadorasophia/murder/tree/main/src/Murder/Core/Sounds/"
    click AssetMgmt "https://github.com/isadorasophia/murder/tree/main/src/Murder/Assets/"
    click WorldEditor "https://github.com/isadorasophia/murder/blob/main/src/Murder.Editor/CustomEditors/WorldAssetEditor.cs"
    click DialogueEditor "https://github.com/isadorasophia/murder/tree/main/src/Murder/Core/Dialogs/"
    click ParticleEditor "https://github.com/isadorasophia/murder/blob/main/src/Murder.Editor/CustomEditors/ParticleSystemEditor.cs"
    click SoundEditor "https://github.com/isadorasophia/murder/tree/main/src/Murder.Editor/Systems/Sounds/"
    click Components "https://github.com/isadorasophia/murder/tree/main/src/Murder/Components/"
    click Systems "https://github.com/isadorasophia/murder/tree/main/src/Murder/Systems/"
    click AssetProcessor "https://github.com/isadorasophia/murder/tree/main/src/Murder/Data/"
    click EditorTools "https://github.com/isadorasophia/murder/tree/main/src/Murder.Editor/CustomEditors/"
    click GameServices "https://github.com/isadorasophia/murder/tree/main/src/Murder/Services/"
    click EntitySystem "https://github.com/isadorasophia/murder/tree/main/src/Murder/Data/Prefabs/"

    %% Styles
    classDef core fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef service fill:#90EE90,stroke:#333,stroke-width:2px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px
    classDef asset fill:#FFD700,stroke:#333,stroke-width:2px
    classDef editor fill:#FFB6C1,stroke:#333,stroke-width:2px
```
