# godotengine/godot-demo-projects architecture

> Architecture diagram of the GitHub repository godotengine/godot-demo-projects, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/godotengine/godot-demo-projects
- Repository: https://github.com/godotengine/godot-demo-projects

## Overview

##### High-Level Architecture Overview

The system should be represented as a hierarchical structure with these main components:

a. Category-based Organization
- Create top-level categories matching the main directories (2d, 3d, audio, compute, gui, etc.)

b. Project Structure Layer
- Demo project as a subcomponent
- Configuration files (project.godot) as small attached elements

##### Key Components

a. Core Project Types
- 2D Games/Demos
- 3D Applications
- GUI Examples
- Networking Systems
- XR Applications
- Plugin Architecture
- Audio Systems

b. Shared Resources
- Common elements like:
- Screenshots directory
- Documentation
- Asset directories
- Configuration files

##### Relationships and Dependencies

- Project dependencies
- Resource sharing
- Common patterns between similar demos
- Technology relationships (e.g., OpenXR dependencies)

##### Technical Details Layer

- Engine version compatibility
- Programming language use (GDScript/C#)
- External dependencies
- Platform-specific components

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Legend
        A[Project Category]
        B([Individual Project])
        C{External Interface}
        D[(Resource)]
        style A fill:#3498db
        style B fill:#2ecc71
        style C fill:#e74c3c
        style D fill:#9b59b6
    end

    subgraph MainCategories
        TwoD["2D Projects"]
        ThreeD["3D Projects"]
        GUI["GUI Examples"]
        Net["Networking"]
        XR["XR Applications"]
        Plugins["Plugin Architecture"]
        Audio["Audio Systems"]
        Docs["Documentation"]
    end

    %% 2D Projects
    TwoD --> DTC([Dodge the Creeps])
    TwoD --> Plat2D([Platformer])
    TwoD --> Pong([Pong])
    click TwoD "https://github.com/godotengine/godot-demo-projects/tree/master//2d/"
    click DTC "https://github.com/godotengine/godot-demo-projects/tree/master//2d/dodge_the_creeps/"
    click Plat2D "https://github.com/godotengine/godot-demo-projects/tree/master//2d/platformer/"
    click Pong "https://github.com/godotengine/godot-demo-projects/tree/master//2d/pong/"

    %% 3D Projects
    ThreeD --> Plat3D([3D Platformer])
    ThreeD --> MatTest([Material Testers])
    ThreeD --> KinChar([Kinematic Character])
    click ThreeD "https://github.com/godotengine/godot-demo-projects/tree/master//3d/"
    click Plat3D "https://github.com/godotengine/godot-demo-projects/tree/master//3d/platformer/"
    click MatTest "https://github.com/godotengine/godot-demo-projects/tree/master//3d/material_testers/"
    click KinChar "https://github.com/godotengine/godot-demo-projects/tree/master//3d/kinematic_character/"

    %% GUI Examples
    GUI --> CtrlGal([Control Gallery])
    GUI --> DragDrop([Drag and Drop])
    GUI --> Trans([Translation])
    click GUI "https://github.com/godotengine/godot-demo-projects/tree/master//gui/"
    click CtrlGal "https://github.com/godotengine/godot-demo-projects/tree/master//gui/control_gallery/"
    click DragDrop "https://github.com/godotengine/godot-demo-projects/tree/master//gui/drag_and_drop/"
    click Trans "https://github.com/godotengine/godot-demo-projects/tree/master//gui/translation/"

    %% Networking
    Net --> MPong([Multiplayer Pong])
    Net --> WSChat([WebSocket Chat])
    Net --> WebRTC([WebRTC Signaling])
    click Net "https://github.com/godotengine/godot-demo-projects/tree/master//networking/"
    click MPong "https://github.com/godotengine/godot-demo-projects/tree/master//networking/multiplayer_pong/"
    click WSChat "https://github.com/godotengine/godot-demo-projects/tree/master//networking/websocket_chat/"
    click WebRTC "https://github.com/godotengine/godot-demo-projects/tree/master//networking/webrtc_signaling/"

    %% XR Applications
    XR --> HandTrack([Hand Tracking Demo])
    XR --> CompLayers([Composition Layers])
    XR --> CharMove([Character Movement])
    click XR "https://github.com/godotengine/godot-demo-projects/tree/master//xr/"
    click HandTrack "https://github.com/godotengine/godot-demo-projects/tree/master//xr/openxr_hand_tracking_demo/"
    click CompLayers "https://github.com/godotengine/godot-demo-projects/tree/master//xr/openxr_composition_layers/"
    click CharMove "https://github.com/godotengine/godot-demo-projects/tree/master//xr/openxr_character_centric_movement/"

    %% Plugin Architecture
    Plugins --> CustomNode([Custom Node])
    Plugins --> MatCreator([Material Creator])
    Plugins --> MainScreen([Main Screen])
    click Plugins "https://github.com/godotengine/godot-demo-projects/tree/master//plugins/"
    click CustomNode "https://github.com/godotengine/godot-demo-projects/tree/master//plugins/addons/custom_node/"
    click MatCreator "https://github.com/godotengine/godot-demo-projects/tree/master//plugins/addons/material_creator/"
    click MainScreen "https://github.com/godotengine/godot-demo-projects/tree/master//plugins/addons/main_screen/"

    %% Audio Systems
    Audio --> BPMSync([BPM Sync])
    Audio --> MidiPiano([MIDI Piano])
    Audio --> Spectrum([Spectrum])
    click Audio "https://github.com/godotengine/godot-demo-projects/tree/master//audio/"
    click BPMSync "https://github.com/godotengine/godot-demo-projects/tree/master//audio/bpm_sync/"
    click MidiPiano "https://github.com/godotengine/godot-demo-projects/tree/master//audio/midi_piano/"
    click Spectrum "https://github.com/godotengine/godot-demo-projects/tree/master//audio/spectrum/"

    %% Documentation
    Docs --> Screenshots[(Screenshots)]
    Docs --> ReadMe[(README Files)]

    %% Styling
    classDef category fill:#3498db,stroke:#2980b9,stroke-width:2px
    classDef project fill:#2ecc71,stroke:#27ae60,stroke-width:2px
    classDef resource fill:#9b59b6,stroke:#8e44ad,stroke-width:2px
    
    class TwoD,ThreeD,GUI,Net,XR,Plugins,Audio,Docs category
    class DTC,Plat2D,Pong,Plat3D,MatTest,KinChar,CtrlGal,DragDrop,Trans,MPong,WSChat,WebRTC,HandTrack,CompLayers,CharMove,CustomNode,MatCreator,MainScreen,BPMSync,MidiPiano,Spectrum project
    class Screenshots,ReadMe resource
```
