ChainedEngine is a modular C++23 game engine with editor tooling, runtime packaging, ECS architecture, physics, OpenGL 4.3+ rendering, and managed C# gameplay scripting via Coral. Ships with a parkour game Chained Decos.
Note
Active development is ongoing. Features and workflows continue to evolve, but this README is maintained to reflect the current repository state.
- Overview
- Quick Start
- Build
- Run
- Working with Projects
- Project Structure
- Dependencies
- Prerequisites
- Testing
- CI/CD
- Troubleshooting
- Known Issues
- Documentation
- Contributing
- License
Chained Decos and Chained Engine target Windows and Linux.
- OpenGL 4.3+ rendering pipeline with PBR, fog, and shadow mapping
- ECS-driven scene model using EnTT
- YAML-based project and scene serialization
- Editor with hierarchy/inspector/panels and in-editor play mode
- Managed C# gameplay scripting through Coral (.NET/CoreCLR)
- UDP networking with client/server model, UPnP port forwarding, and encryption
- Project export pipeline with compressed asset packs (ZSTD)
- Visual Animation Graph system (
.chag)
Inspiration: ChainedEngine is inspired by Hazel by TheCherno, with significant custom additions — C# scripting via Coral, Jolt physics, animation graph system, project export pipeline, and multi-platform support.
Clone:
git clone --recurse-submodules https://github.com/IOleg-crypto/ChainedEngine.git
cd ChainedEngine
git submodule update --init --recursiveConfigure + Build + Run:
# Linux
cmake --preset linux-clang
cmake --build --preset linux-clang --parallel
./build/linux-clang/bin/ChainedEditor
# Windows (MSYS2 Clang)
cmake --preset windows-clang
cmake --build --preset windows-clang --parallel
.\build\windows-clang\bin\ChainedEditor.exe
# Windows (MSVC Ninja)
cmake --preset windows-msvc
cmake --build --preset windows-msvc --parallel
# Windows (VS 2026 .sln)
cmake --preset windows-vs2026Editor play mode: Press PLAY to enter simulation and capture cursor. Press Escape to return to editor interaction.
| Preset | Generator | Compiler | Use case |
|---|---|---|---|
windows-clang |
Ninja Multi-Config | Clang (MSYS2) | Primary dev |
windows-msvc |
Ninja Multi-Config | MSVC (cl) | MSVC Ninja |
windows-vs2026 |
Visual Studio 18 2026 | MSVC | VS solution / CI |
linux-clang |
Ninja Multi-Config | Clang | Linux CI |
linux-gcc |
Ninja Multi-Config | GCC | Linux |
windows-gcc |
Ninja Multi-Config | GCC (MinGW) | MinGW |
Key CMake variables:
CH_ACTIVE_GAME—chaineddecos(default) ortestproject. Build-time only. Switching requires reconfigure.BUILD_TESTS— ON by default.CH_ENGINE_SHARED— OFF by default (static engine).
If you use Clang on Windows and see Intellisense errors in VS Code, ensure .vscode/settings.json points to the correct build dir:
"clangd.arguments": ["--compile-commands-dir=${workspaceFolder}/build/windows-clang"]Binaries are generated under build/{preset}/bin/:
# Editor
./build/linux-clang/bin/ChainedEditor
.\build\windows-clang\bin\ChainedEditor.exe
# Runtime
./build/linux-clang/bin/ChainedRuntime path/to/project.chproject
.\build\windows-clang\bin\ChainedRuntime.exe --project path\to\project.chproject --name "My Runtime" --width 1600 --height 900Runtime CLI: --project / -p, --name, --width, --height.
The engine supports multiple game projects under game/. Currently:
chaineddecos— the main parkour gametestproject— a lightweight sandbox for testing features
cmake -S . -B build/windows-clang -DCH_ACTIVE_GAME=testprojectOr in VS Code: Command Palette → CMake: Edit CMake Cache (UI) → change CH_ACTIVE_GAME.
Use the scaffolding script:
python tools/create_game.py MyGame
python tools/create_game.py MyGame --csproj assets/scripts/MyGame.Scripts.csprojThis creates game/mygame/ with:
CMakeLists.txt— wired into the build via auto-discoverysrc/main.cpp—CreateApplicationentry pointMyGame.chproject— project metadataassets/scripts/— for C# scripts
New games are auto-discovered by the root CMakeLists.txt — any directory under game/ with a CMakeLists.txt is included when CH_ACTIVE_GAME matches.
The editor (Project → New Project) now also generates CMake build scaffolding:
{project}/CMakeLists.txt—chained_add_game()boilerplate{project}/src/main.cpp—CreateApplicationentry point
For a standalone build, move the project directory under game/ (e.g. game/mygame/) so it is auto‑discovered by the root CMakeLists.txt.
Each game has a YAML metadata file defining its entry scene, physics, rendering, and window settings. See User Guide for the full reference.
engine/— core engine modules (graphics, scene, physics, audio, platform, assets, networking)editor/— ChainedEditor application and editor panels/toolsruntime/— ChainedRuntime application and runtime layerengine/scripting/— script host, glue bindings, and managed build integrationgame/chaineddecos/— main game projectgame/testproject/— alternate sandbox projecttests/— native C++ tests (GoogleTest)thirdparty/— third-party dependencies (git submodules)tools/— build scripts, glue code generator, resource sync
| Library | Purpose |
|---|---|
| EnTT | ECS framework |
| Assimp | 3D model import |
| Coral | C#/C++ interop |
| ImGui + ImGuizmo | Editor UI |
| GLFW + GLAD | Window/OpenGL |
| GLM | Math library |
| yaml-cpp | YAML serialization |
| GoogleTest | Unit/integration tests |
| JoltPhysics | Physics simulation |
| zstd + pack (cfnptr) | Asset pack compression |
| miniaudio | Audio |
| spdlog | Logging |
| stb | Image loading |
| cereal | Binary serialization |
| reflect-cpp | Runtime reflection |
| ENet | UDP networking |
| libsodium | Encryption (xchacha20poly1305) |
| miniupnpc | UPnP port forwarding |
Always init submodules before building:
git submodule update --init --recursive| Tool | Version | Notes |
|---|---|---|
| CMake | 3.31+ | Required by top-level CMakeLists |
| Compiler | C++23 | Clang 18+, MSVC (VS2022+), or MSYS2/MinGW-w64 |
| Ninja | Latest | Recommended for fast parallel builds |
| .NET SDK | 10.0.x | Required for managed scripting |
| Graphics Driver | OpenGL 4.3+ | Needed for rendering |
Linux packages (Ubuntu reference):
sudo apt-get install -y build-essential cmake ninja-build \
libgl1-mesa-dev libx11-dev libxrandr-dev libxinerama-dev \
libxcursor-dev libxi-dev libasound2-dev libglu1-mesa-dev \
pkg-config libgtk-3-dev libdrm-dev libgbm-dev \
xvfb libxkbcommon-x11-0 libgl1-mesa-dri mesa-utilsNative tests use GoogleTest + CTest, split into unit (fast, no engine runtime) and integration (full engine) targets.
# Run all tests
ctest --test-dir build/windows-clang --output-on-failure
# Unit tests only
ctest --test-dir build/windows-clang -L Unit --output-on-failure
# Integration tests only
ctest --test-dir build/windows-clang -L Integration --output-on-failureManaged (C#) tests require .NET SDK 10.0.x on PATH. Without it, the scripting target is silently skipped.
CI workflow (.github/workflows/ci.yml) fans out to:
- Format Check (
format.yml):clang-format-18 --dry-run -Werroron changed C++ files - Linux Builds (
linux.yml): Debug + Release underxvfb+ Mesa software rendering - Windows Builds (
windows.yml): Debug + Release matrix (Clang, MSVC, GCC)
Debug builds use -DENABLE_SANITIZERS=ON (ASan + UBSan). CTest output is captured as JUnit XML.
Deploy workflow (.github/workflows/deploy-sdk.yml): triggered by v* tags, packages ChainedEditor + ChainedRuntime artifacts.
- Submodule errors:
git submodule update --init --recursive - Generator conflicts: Reconfigure from a clean build folder when switching generator families
- No managed build: Ensure
dotnetSDK 10.0.x is on PATH - Linux headless: Install packages from Prerequisites, use
xvfb+ Mesa - Stale files after
CH_ACTIVE_GAMEchange: Reconfigure the build directory, don't just rebuild
- Font system needs rework for in-scene text and editor
- Some native tests are being reworked and may be skipped in CI
- Runtime and editor workflows are under active iteration
- Virtual file system is planned/in-progress
- Runtime may have bugs and issues — known problems include font rendering, physics edge cases, and occasional crashes under specific scenarios
Full guides and references:
| Document | Description |
|---|---|
| User Guide | Step-by-step: build, run, create scenes, write scripts, export |
| Engine Architecture | Bootstrapping, system initialization, main loop |
| Component Reference | All ECS components, adding new ones |
| Scripting API | C# API reference: lifecycle, entities, input, UI |
| Scripting Interop | C++/C# bridge internals |
| Animation Graphs | Visual animation graph system tutorial |
| Export Guide | Project packaging and distribution |
| FAQ | Common patterns and solutions |
- Open issues for bugs/regressions
- Submit pull requests for fixes and improvements
- Platform/build workflow improvements are especially helpful
This project is licensed under MIT. See license for details.


