Kanae is a high-performance, universal game engine built on data-oriented principles. It features a fully decoupled 16-thread fiber job system, sparse-set ECS, and a physically based (PBR) rendering pipeline, designing for maximum cache locality and thread throughput on modern hardware.
The engine uses a decoupled architecture where Physics (Fixed Update) and Rendering (Interpolated) run at different frequencies.
graph TD
subgraph "Core Loop"
Input[Input Polling] --> JobSystem
JobSystem --> Update
JobSystem --> Render
end
subgraph "Systems (ECS)"
Update --> Script[Lua Scripting]
Update --> Physics[Physics Solver]
Update --> Audio[Audio Mixer]
Physics -->|State| Transform[Sparse Set Storage]
end
subgraph "Rendering Pipeline"
Render --> Cull[Frustum Culling]
Cull --> Sort[State Sorting]
Sort --> Batch[Batcher]
Batch --> GPU[OpenGL 4.6 Backend]
end
subgraph "Hot Reload"
Watch[File Watcher] -.->|Reload| Script
Watch -.->|Recompile| GPU
end
- Fiber Job System: N-thread work stealing scheduler for massive parallelism.
- Data-Oriented ECS: Sparse set component storage ensuring O(1) access and optimal cache coherence.
- Memory Management: Region-based compositors with linear allocators to eliminate GC spikes.
- Modern OpenGL 4.6: Direct State Access (DSA) and Multi-Draw Indirect (MDI).
- PBR Pipeline: Metallic/Roughness workflow with Image Based Lighting (IBL).
- Post-Processing: Bloom, Tone Mapping (ACES), and Gamma Correction.
- Hot-Reloading: Real-time reloading of Lua scripts, Shaders, and Textures without restarting.
- Virtual File System: Protocol abstraction (
core://,game://) for transparent asset loading. - Reflection System: Runtime introspection of C++ types for serialization and editor tooling.
- C++17 Compiler (GCC 9+, Clang 10+, MSVC 2019+)
- CMake 3.20+
- OpenGL 4.6 capable GPU
# Clone the repository
git clone https://github.com/KleaSCM/Kanae.git
cd Kanae
# Configure and build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .# Run the engine editor/sandbox
./bin/KanaeKanae/
├── src/
│ ├── Core/ # JobSystem, Memory, Logging
│ ├── Systems/ # ECS, Physics, Audio
│ ├── Renderer/ # OpenGL Backend, Shaders
│ ├── Scripting/ # Lua bindings (sol2)
│ ├── Platform/ # Windowing (GLFW), Input
│ └── Scene/ # Serialization, Entity management
├── include/ # Public headers
├── assets/ # Shaders, Textures, Scripts
└── external/ # Vendor libraries (glad, glm, stb)
MIT License — see LICENSE file for details.
For questions and support: KleaSCM@gmail.com