Skip to content

Repository files navigation

Context Game Engine

Context — build worlds from files, render them in real time

Context is a minimal-kernel game engine where every feature is a package, built AI-first without making humans second-class. Project files are the single source of truth, and GUI, CLI, and AI agents are equal clients over one RPC surface — the full authoring loop runs with no GPU and no GUI, and what you play in the editor is what ships.

Project files flow through the EditorKernel to GUI, CLI and AI agents — equal clients

Features

  • Everything is a package on a minimal kernel — physics, particles, animation, audio, input, UI
  • File-authoritative — every edit is a file write; GUI, CLI, and AI agents are equal clients
  • Windowed editor — dockable panels, command palette, themes, multi-window tear-out
  • TypeScript gameplay on an embedded V8, with a C++/WASM native tier for hot paths
  • WebGPU rendering — native and in the browser; 2D is first-class
  • Deterministic simulation — same inputs, same state hash, on every machine
  • One contract — CLI ≡ RPC ≡ MCP: AI agents get the same surface humans do

The editor

Requires CMake ≥ 3.25 and Python 3; on Windows also Visual Studio with the C++ workload (the editor's CEF prebuilt needs MSVC there, clang on Linux/macOS). One command builds it from any shell — on Windows it finds Visual Studio and imports its environment by itself:

python tools/build_editor.py

The editor lands in src/build/editor/editor/shell/Release/ and spawns or attaches the project daemon by itself.

Run (release mode):

src/build/editor/editor/shell/Release/context_editor --project samples/platformer-2d

A bare launch (no --project) opens the welcome screen.

Run (dev mode):

src/build/editor/editor/shell/Release/context_editor --project samples/platformer-2d --devtools

--devtools enables Chromium DevTools, --headless runs the shell without an OS window, --help lists everything. python tools/build_editor.py --gpu builds with GPU presentation (without it the editor presents through the CPU fallback).

Same inputs, same state-hash — on every machine, every run

Build & test (engine + CLI)

The headless engine, CLI, and test suite build with any C++20 compiler — no GPU or GUI needed:

cmake -S src --preset dev
cd src
cmake --build --preset dev
ctest --preset dev

Builds land in src/build/dev/; the context CLI at src/build/dev/cli/context.

Headless terminal: context build, deterministic state-hash, zero GPU, zero GUI

A microkernel where every feature is a package

Repository layout

Directory Contents
src/kernel/ The microkernel — the ~6 stable interfaces everything else plugs into
src/editor/ EditorKernel — the file-authoritative project daemon, plus the editor shell + web UI
src/runtime/ RuntimeKernel — the runtime the editor embeds and shipped builds use
src/render/ WebGPU renderer (native + Emscripten web)
src/packages/ First-party feature packages (every feature is a package)
src/cli/ The context CLI — one contract registry projected to CLI, RPC, and MCP
samples/ Runnable sample projects, CI-gated (rots-if-broken)
docs/ Engineering docs that live with the code

License

Source-available under the Context Engine EULA (draft — see LICENSE.md): free under $200,000/year of gross revenue per product; above that, a 2% marginal royalty on the revenue above the threshold. Not open source — you may build games with it; you may not build engines from it.

Contributing

External PRs cannot be merged until the CLA flow exists — see CONTRIBUTING.md. Issues, bug reports, and design discussion are welcome.

Build, run, verify, ship — zero GPU, zero GUI

About

Context Game Engine — AI-first, file-authoritative, headless-complete game engine

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages