# seiya0106/game_siv3d architecture

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

- Interactive diagram: https://gitdiagram.com/seiya0106/game_siv3d
- Repository: https://github.com/seiya0106/game_siv3d

## Overview

##### Project type and purpose
- This is a cross-platform native desktop game template built on the Siv3D engine (v0.6.16), targeting Windows (Visual Studio) and macOS (Xcode).
- It provides a ready-made project structure—including engine libraries, shaders, fonts, audio modules, sample assets, and build scripts—to jumpstart game-jam or hobby game development.

##### File structure
- Top-level:
- / – Siv3D engine headers
- lib/ – Siv3D engine static/dynamic libraries
- projects/Game/ – the Game application
- Under projects/Game:
- App/ – resource definitions (.rc), DLLs (SoundTouch), engine resources (fonts, shaders, soundfonts, textures)
- example/ – sample assets demonstrating engine features (CSV, JSON, OBJ, shaders, scripts, media)
- src/ – application source (Main.cpp, stdafx.*)
- Game.sln, Game.vcxproj(.filters) – Windows build definitions
- Game.xcodeproj – macOS build definition
- Patterns:
- Layered architecture (App code → Engine modules → Platform APIs)
- Resource-centric modules (shaders, fonts, audio, textures)
- Configuration/build files: .sln, .vcxproj, Xcode project, .gitignore, LICENSE.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Developer Workstation
    subgraph "Developer Workstation" 
        VS["Visual Studio"]:::build
        Xcode["Xcode (macOS)"]:::build
    end

    %% Build System
    subgraph "Build System" 
        Headers["Engine Headers (include/)"]:::build
        Libs["Engine Libraries (lib/)"]:::build
        MSBuild["MSBuild (.sln, .vcxproj)"]:::build
        XcodeBuild["Xcode Build Tools (.xcodeproj)"]:::build
    end

    %% Application Code & Build Artifacts
    subgraph "Game Application" 
        Src["Main.cpp, stdafx.*"]:::app
        RC["Resource.rc"]:::app
        Binary["Game.exe / Game.app"]:::app
    end

    %% Engine Modules
    subgraph "Siv3D Engine" 
        subgraph Rendering
            D3D11["D3D11 Shaders"]:::engine
            GLSL["GLSL Shaders"]:::engine
            MSL["Metal Shaders"]:::engine
        end
        subgraph Audio
            DLL_ST["SoundTouch DLL(s)"]:::engine
            DYLIB_ST["libSoundTouch.dylib"]:::engine
            Soundfont["Soundfont Loader"]:::engine
        end
        Input["Input Module"]:::engine
        Scripting["AngelScript Module"]:::engine
    end

    %% Resource Repositories
    subgraph "Resource Repositories"
        Fonts["Fonts"]:::resource
        Textures["Textures"]:::resource
        Soundfonts["Soundfonts"]:::resource
        Examples["Example Assets"]:::resource
        Scripts["Script Examples"]:::resource
    end

    %% OS / Platform Abstraction
    subgraph "Platform Abstraction"
        WinAPI["Windows API"]:::os
        MacAPI["macOS APIs"]:::os
    end

    %% Build-Time Flow
    VS -->|edits| Src
    Xcode -->|edits| Src
    VS -->|invokes| MSBuild
    Xcode -->|invokes| XcodeBuild
    MSBuild -->|uses| Headers
    MSBuild -->|links| Libs
    XcodeBuild -->|uses| Headers
    XcodeBuild -->|links| Libs
    MSBuild -->|builds| Binary
    XcodeBuild -->|builds| Binary

    %% Runtime Flow
    Binary -->|calls| Rendering
    Binary -->|calls| Audio
    Binary -->|calls| Input
    Binary -->|calls| Scripting

    %% Engine to OS
    Rendering -->|submit draw call| WinAPI
    Rendering -->|submit draw call| MacAPI
    Audio -->|play audio| WinAPI
    Audio -->|play audio| MacAPI
    Input -->|get input| WinAPI
    Input -->|get input| MacAPI

    %% Resource Loading
    Binary -->|load font| Fonts
    Binary -->|load texture| Textures
    Binary -->|load soundfont| Soundfonts
    Binary -->|load example asset| Examples
    Binary -->|load script| Scripts

    %% Click Events
    click VS "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/Game.sln"
    click VS "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/Game.vcxproj"
    click VS "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/Game.vcxproj.filters"
    click Xcode "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/Game.xcodeproj/project.pbxproj"
    click Headers "https://github.com/seiya0106/game_siv3d/tree/main/include/"
    click Libs "https://github.com/seiya0106/game_siv3d/tree/main/lib/"
    click Src "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/src/Main.cpp"
    click Src "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/stdafx.h"
    click Src "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/stdafx.cpp"
    click RC "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/App/Resource.rc"
    click D3D11 "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/shader/d3d11/"
    click GLSL "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/shader/glsl/"
    click MSL "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/shader/msl/"
    click DLL_ST "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/dll/soundtouch/"
    click DYLIB_ST "https://github.com/seiya0106/game_siv3d/blob/main/projects/Game/App/engine/lib/soundtouch/libSoundTouch.dylib"
    click Soundfont "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/soundfont/"
    click Fonts "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/font/"
    click Textures "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/engine/texture/"
    click Scripts "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/example/script/"
    click Examples "https://github.com/seiya0106/game_siv3d/tree/main/projects/Game/App/example/"

    %% Styles
    classDef build fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef app fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef engine fill:#ffe0b2,stroke:#333,stroke-width:1px
    classDef resource fill:#e0e0e0,stroke:#333,stroke-width:1px
    classDef os fill:#eeeeee,stroke:#333,stroke-width:1px
```
