Mirror of github.com/Khyretos/kk-engine (GitHub is the main copy)
  • C++ 92.8%
  • CMake 2.1%
  • Python 1.5%
  • GLSL 1.5%
  • Java 0.5%
  • Other 1.5%
Find a file
2026-09-27 19:59:22 +00:00
.claude Add AGENTS.md, skills and check_game so any AI can help make games 2026-09-27 00:23:49 +00:00
.github Vulkan: the missing barriers behind the dark patches on phones 2026-09-27 19:01:16 +00:00
android Android: a name tag in the corner of every game, with the orientation in the benchmark 2026-09-27 13:27:47 +00:00
assets Moods: warmer morning, farm and platoon on clear day, site screenshots 2026-09-27 05:30:39 +00:00
benchmarks Phones: ImGui panels that fit, and a cookbook run with something to watch 2026-09-27 19:10:27 +00:00
cmake Moods: sky images, sky light, height fog, colour looks and ambience for every demo 2026-09-27 03:18:34 +00:00
docker Phones: landscape by default, UI sized for the screen, benchmark both ways 2026-09-27 12:58:25 +00:00
docs Merge remote-tracking branch 'origin/main' into claude/cloth-hair-mm26cv 2026-09-27 19:59:22 +00:00
engine Cloth: settled layers under Full protection fall asleep 2026-09-27 19:59:21 +00:00
external/FEMFX Clear every warning: RmlUi toast binding, Vulkan buffer lifetime, -Wall -Wextra 2026-09-26 15:06:07 +00:00
games Merge main 2026-09-27 19:10:28 +00:00
LICENSES Licences: full Noto OFL text, AgX MIT notice, shared licence collector for packages and the server image 2026-09-26 21:42:59 +00:00
scenes Moods: warmer morning, farm and platoon on clear day, site screenshots 2026-09-27 05:30:39 +00:00
shaders Hair: physics from natural to solid, points built once a frame 2026-09-27 19:00:03 +00:00
skills Scripts: invisible and glass bodies (visible = false, glass, cloudy) 2026-09-27 18:15:41 +00:00
tests Cloth: settled layers under Full protection fall asleep 2026-09-27 19:59:21 +00:00
tools Scripts: invisible and glass bodies (visible = false, glass, cloudy) 2026-09-27 18:15:41 +00:00
website Climb Race: results screen, sounds, docs and website (milestone 5) 2026-09-27 08:27:49 +00:00
.dockerignore Showcase website for engine.kreative-kompas.com (Hugo + Docker) 2026-09-26 18:33:10 +00:00
.gitignore Cooked art: a key per bake, never stored whole, secret stays home 2026-09-27 11:24:15 +00:00
ACTION_PLAN.md Networking: server-side input replay for competitive games (#28) 2026-09-26 22:02:21 +00:00
AGENTS.md Docs: every demo explained in depth, and a Demos tab on the docs site 2026-09-27 08:56:47 +00:00
AI_GUIDE.md Add AGENTS.md, skills and check_game so any AI can help make games 2026-09-27 00:23:49 +00:00
BUGS.md Synty pose sliders per character, clips play during the stand-up blend (BUG-085) 2026-09-27 11:32:24 +00:00
CLAUDE.md Add AGENTS.md, skills and check_game so any AI can help make games 2026-09-27 00:23:49 +00:00
CMakeLists.txt Merge main 2026-09-27 10:51:56 +00:00
CMakePresets.json Android: an installable APK of every demo, built in CI and releases 2026-09-27 08:45:48 +00:00
CODE_OF_CONDUCT.md Benchmarks in CI and contributor setup 2026-09-26 18:17:20 +00:00
CONTRIBUTING.md Benchmarks in CI and contributor setup 2026-09-26 18:17:20 +00:00
docker-compose.yml Presentable repo: fresh README, old README becomes docs/HISTORY.md 2026-09-26 17:04:04 +00:00
LICENSE MIT licence 2026-09-26 14:13:30 +00:00
mkdocs.yml Hair docs (docs/HAIR.md), cloth demo README in the shared demo structure, roadmap row 2026-09-27 11:47:13 +00:00
README.md Docs: showcase pad controls, P push-to-talk, physics seed on the panel 2026-09-27 10:44:54 +00:00
ROADMAP.md Sandbox pad leftovers; goblin_horde says a missing pack at info 2026-09-27 12:42:28 +00:00
SECURITY.md Benchmarks in CI and contributor setup 2026-09-26 18:17:20 +00:00

Kreative Kompas Engine: direct your creativity

CI MIT licence C++17 Vulkan Support KKE on Ko-fi

Kreative Kompas Engine (KKE)

A modular, open-source Vulkan game engine in C++17, built from "lego pieces": each library does one job, and every gameplay or rendering system is a Module you plug into an Application. A game is a list of addModule<>() calls.

KKE aims to be approachable for people scripting games in Lua and for programmers writing C++ modules, while staying close to the hardware and running on a single-core minimum spec.

KKE is AI-coded. The code is written by Claude (Anthropic) working directly in this repo, in small slices that are built, run and verified (screenshots, logs, tests) before they count as done. Read it and question it like any codebase you didn't write yourself.

Features

Area What you get
Core Module system with a clear lifecycle, fixed-timestep loop, per-module fault isolation, pause/step debugging, async logging (spdlog), thread pool
Rendering Vulkan (volk + VMA), PBR (Cook-Torrance), up to 4 lights, soft shadow maps, GPU particles, instancing, frustum culling, mip maps
Physics Jolt rigid bodies, world collision and a character controller; AMD FEMFX deformable bodies with plasticity, material fracture and Voronoi breaking; jiggle physics for bones and soft bodies
Simulation Particle liquids (PBF) with temperature, meltable voxel solids, Gerstner ocean with buoyancy
Characters FBX/OBJ import (ufbx), skinning, animation blending, locomotion with vaulting, ledge hang and shimmy, ragdolls
UI RmlUi (HTML/CSS-style game UI) on a custom Vulkan backend, Dear ImGui debug panels, player settings, Noto fonts with colour emoji
Audio miniaudio output, own mixer, 3D sound, occlusion, synthesized impact sounds, a sound visualizer for deaf and hard-of-hearing players
Input Rebindable actions for keyboard, mouse, gamepads (paddles, gyro), HOTAS and twin sticks, with hold/tap/double-tap/toggle triggers and chords
Networking Host/join over ENet, LAN discovery, server-authoritative physics, lag/jitter/loss simulation
Scripting Lua 5.4, Garry's Mod-style hooks and timers, hot reload, sandboxed
Content game.json manifests, a marketplace index, level save/load, an asset catalog for Synty-style packs

What is solid, partial or not started yet, system by system: ROADMAP.md. Known defects and their fixes: BUGS.md.

Quick start

To just try the demos, download a Windows or Linux build from Releases, unpack it and run kke_demo (docs/RELEASES.md). To build from source on Linux (Debian/Ubuntu shown; Arch and troubleshooting are in docs/BUILDING.md):

sudo apt-get install -y build-essential cmake ninja-build git \
    libvulkan-dev vulkan-tools mesa-vulkan-drivers glslang-tools \
    libdrm-dev libxkbcommon-dev libx11-dev libxext-dev libxrandr-dev \
    libxcursor-dev libxi-dev libxinerama-dev libwayland-dev \
    libfreetype-dev pkg-config libudev-dev libdbus-1-dev \
    libgl1-mesa-dev libegl1-mesa-dev libasound2-dev libdecor-0-dev \
    libexpat1-dev libxml2-dev

git clone https://github.com/Khyretos/kk-engine.git
cd kk-engine
cmake --workflow --preset default      # configure + build (CMake 3.25+)
cd build/bin && ./kke_demo

Every dependency is fetched from source by CMake, so the versions match on every platform. Run demos from build/bin/: shaders, fonts and each game's game.json are copied next to the executables.

Preset What it builds
default Core engine with Jolt, Lua and networking; the smallest, fastest build
everything Adds AMD FEMFX deformable physics and the GPU profiler
everything-release everything, optimized (RelWithDebInfo) in build-release/; use this to judge performance

Windows (MinGW cross build) and Android builds run in Docker (docker compose run --rm windows); macOS and MSVC builds run on GitHub Actions. Platforms, hardware targets and consoles: docs/PLATFORMS.md.

Demos

Executable What it shows
kke_demo The walkable showcase: an animated character in a small level using every system. WASD/Shift/Space to move, V for first/third person, left click or RT to shoot, E or Y to push, Esc or Start for the menu (it plays fully on a controller), F1 for engine panels. KKE_NET=host / KKE_NET=join:<ip> for multiplayer
sandbox Browse your asset packs, build a level on a grid, save and load it, make props breakable and throw things at them
physics_demo FEMFX deformable bodies, fracture and plasticity (needs the everything preset)
melt_demo Pour lava on ice, wax, chocolate and aluminium and watch them melt
sea_demo Drive a boat over the swell; foam floats, iron sinks
jiggle_demo Jelly on a plate and soft-tissue bones on a jogging character
farm_demo You are a dog on a farm; sheep, cows, pigs, horses and a fox react to you (AI core)
procedural_demo A spider, a beetle, a dog and a person walking over hills with no animation clips: procedural gaits, look-at, FABRIK, and active ragdolls that stagger, fall and get up
pet_companion You and a pug in a garden: come, sit, stay, fetch and pet it with mouse, controller or touch; it reads what you do and never gets in your way (AI core, orders)
platoon Command a squad of six against a dug-in enemy: select, formations, take cover, focus fire, an order wheel; both sides run on the AI core
audio_demo Every audio case, one station each: rooms, a great hall, walls of wood, glass and stone, a sound round through a door, crates, footsteps, binaural, pings (headphones recommended)
climb_race Race up a generated mountain: pick each hold with the triggers and bumpers, manage stamina, IK hands and feet, loose rock falls; a start menu where controllers press A to join (up to 4 players, split screen) and 0-5 CPU climbers
duel A one-on-one fist fight in a ring, best of three: jab, uppercut, knee, block and parry, dodge; knockdowns are ragdolls. Against a bot on the AI core, or F2 for two players
goblin_horde Hold a ruined fort against waves of Synty goblins: crowd AI that surrounds you, waits its turn and breaks and runs; sword slashes, a great swing, ragdolls (needs the goblin packs)
synty_demo Synty POLYGON models loaded straight from FBX, skinned and animated
rmlui_demo The game UI toolkit: menus, settings, inventory drag and drop, HUD, and a live input tester
imgui_demo Dear ImGui's full widget demo
kke_basics The original building-block demo: cube, grid, particles, orbit camera

The character in kke_demo is Quaternius' Universal Animation Library mannequin (CC0), assets/animations/UAL1_Standard.fbx, which is in the repository; put UAL2.fbx next to it for the real vault and climb clips. Demos that use Synty packs need your own copy in assets/synty/; paid packs are never part of this repo (assets/README.md).

Every game opens with the 4.5-second Kreative Kompas logo intro. Any key skips it, app.setIntroEnabled(false) turns it off, and KKE_SKIP_INTRO=1 skips it for one run.

Writing a game

The quickest start is the starter template: tools/new_game my_game copies it (a character you can walk, jump and climb with, and a level in Lua), and the tutorials grow it into a small game (Make your own game). The cookbook has recipes for the rest, from your own controls and cameras to A*, flocking and IK, each one run by CI. Any AI assistant can help too: AGENTS.md and its skills teach it the engine, whatever its size. Under the hood a game is a list of modules:

#include "kke/Application.h"
#include "kke/modules/GridModule.h"
#include "kke/modules/OrbitCameraModule.h"

int main() {
    kke::Application app("My Game", 1280, 720);
    app.addModule<kke::GridModule>();
    app.addModule<kke::OrbitCameraModule>();
    app.addModule<MyGameplayModule>();   // your own kke::Module
    app.run();
}

A module overrides the lifecycle hooks it needs (init, update, fixedUpdate, render, renderUi, onEvent, shutdown) and finds other modules with app.getModule<T>(). The games/ folder has one working example per system; Lua scripting is covered in docs/SCRIPTING.md.

Documentation

Document Contents
Docs site Getting started, tutorials, the cookbook, guides and the Lua API reference, searchable
ROADMAP.md Current state of every system and the next gap in each
BUGS.md Every defect found, its cause and fix
ACTION_PLAN.md Everything asked for, in priority order
docs/BUILDING.md Full build guide, system packages, troubleshooting
docs/ Design notes per system: audio, input, movement, networking, scripting, optimization, scaling and more
docs/DEPENDENCIES.md Every third-party library, tool and asset, its licence and what it asks of your game
docs/HISTORY.md The development log: how each system was built and verified
AGENTS.md For AI assistants helping you make a game: skills any model can follow (how to use them)
AI_GUIDE.md Rules for AI agents working on the engine itself

Tests and CI

cmake --build build --target kke_tests && ./build/bin/kke_tests

CI builds on every push with warnings treated as errors and runs the unit test suite plus a headless smoke test on lavapipe. Pushing a v* tag builds, tests and publishes Windows and Linux downloads (docs/RELEASES.md). A second workflow runs the benchmark suite on every push to main and tracks the numbers over time (docs/BENCHMARKS.md).

Contributing

Issues, pull requests and questions are welcome: start with CONTRIBUTING.md. Everyone follows the Code of Conduct; security problems go through SECURITY.md.

Support

KKE is built by one person. If you want to help it exist, Ko-fi is the place. The plan for how KKE reaches people is in docs/GO_TO_MARKET.md, and open work is tracked as GitHub issues by milestone.

Licence

MIT, see LICENSE. Vendored and fetched libraries keep their own licences: every library, font, tool and asset the engine uses, its licence and what that licence asks of games made with KKE is listed in docs/DEPENDENCIES.md (all permissive; nothing copyleft is built into a game). Downloads carry every licence text in THIRD_PARTY_LICENSES.txt. The Kreative Kompas logo and banner are the project's branding.