A deterministic, server-authoritative engine for AI-driven worlds. v3.1.1 compiles one logic core to a Rust workspace and binds it to TypeScript (npm), WASM (browser), a native PyO3 Python binding (PyPI wheel planned), and a C ABI (Unity / Godot / Go) - producing byte-identical results from the same seed on every surface, pinned by shared golden vectors and enforced in CI by the cross-language Determinism Gate. Express tabletop rules as DATA via the Any-System ruleset AST (d20 delta / derived checks, plus PbtA-style 2d6 moves and d100 roll-under checks via the v2 node families: roll vs DC -> degree -> mutations, fail-closed static validation before any RNG draw, never untrusted code). Persist + reconstruct a world from a verified snapshot + replay (HMAC over canonical integer-only state), advance it between sessions with a deterministic epoch world-tick, and run shared play on a real-time multiplayer core - a command-frame tick with client rollback reconciliation and Merkle region hashing, where a client can predict but can never forge an outcome. Underneath: the 14 pure-logic Trinity kernels (acoustic propagation, voxel mesh, packet routing, AI Director governance), plus the universal Bestiary kernel and a tamper-evident HMAC-SHA-256 EventChain for audit trails + anti-cheat. The same determinism ships in production: LoomMaster (theworldtable.ai/loommaster.html) is a live AI Game Master for D&D 5e + the Pathfinder 2e Remaster where every roll is resolved server-side on a seeded PRNG and every turn is HMAC-chained - the LLM only narrates. Try the live playground at theworldtable.ai/engine. Built from scratch for TheWorldTable.ai, open source and available on npm.

01Surfaces

02Quickstart

// 1. install $ npm i loom-engine // 2. attach to a canvas import { Engine } from 'loom-engine'; var canvas = document.querySelector('canvas'); var engine = Engine.create({ canvas: canvas }); // 3. drive the frame loop function tick(now) { engine.tick(now); requestAnimationFrame(tick); } requestAnimationFrame(tick);

03Stats / integrity

Tests
4,259
green at the v3.0 head - golden vectors gated in CI across TS / Python / Rust at the same commit
Versions
146
since v0.10.0 / 2026
Source
75,071
LOC / 263 files (+ 219 test files)
License
BUSL-1.1
Apache on 2030-05-08

04Wave milestones

v1.0.0
BenchmarkHarness
v1.1.5
GhostReplay
v1.2.5
LootTier
v1.3.5
NarrativeMemory
v1.4.5
SoundtrackDirector
v1.5.5
KnowledgeMap
v1.6.5
WorldSeed (procgen complete)
v1.7.5
ChatChannel (networking complete)
v2.0.0
Trinity Mainframe (14 kernels)
v2.1.0
BestiaryKernel (universal NPC lifecycle)
v2.2.x
EventChain (tamper-evident HMAC log)
v3.1.1
Cross-language core (TS/WASM/PyO3/C ABI) + Any-System AST + persistent world + multiplayer

04AWave 2.0 - Trinity Mainframe

14 pure-logic kernels enforcing 90+ Codex hardening gates. All non-negotiable engine invariants honoured: no RNG, no wall clock, no Atomics, fixed-capacity, every input bounds-checked. Maturity: these are standalone, isolated primitives (experimental / beta) - each ships with its own tests and gates, but they are not yet wired together as one integrated runtime. Try them live at theworldtable.ai/engine.

SonicSync
Acoustic propagation: voxel DDA + double-buffered perception events. 40 tests / 7 gates.
LoomVerify
Anti-cheat: PASS/RESYNC/REJECT verdicts, regional Merkle witnesses, value-class ZK gate. 36 tests / 7 gates.
NeuralMaterial
PBR synthesis: capability-gated PACKED_F16/F16/F32 paths, atlas LRU, GPU-timestamp latency. 33 tests / 7 gates.
InferenceOrchestrator
NPC AI router: LOCAL_SLM consented + CLOUD rate-limited, batched dispatch, critical ceiling. 37 tests / 6 gates.
LoomPulse
Player-vibe inference: EMA + confidence + hysteresis, default-deny consent, NO direct reputation. 22 tests / 7 gates.
LoomFlow
Adaptive networking: 3 lanes, per-lane sequence + epoch + idempotency, throttle hysteresis. 37 tests / 6 gates.
NeuralAnimationSystem
Motion-matching + inertialization: feature-DB search, real per-bone delta, exp() LUT decay. 24 tests / 6 gates.
VoxelComputeSystem
Marching-cubes mesher: front/back epoch-swapped density, Bourke MC tables, capacity-checked emit. 24 tests / 6 gates.
AetherGrid
N2N authority handoff: two-phase transfer, idempotency dedup, split-brain detection, crash recovery. 29 tests / 6 gates.
LoomFSR
Temporal upscaler: Halton(2,3) jitter, ping-pong color/depth/normal history, FSR-class sharpening. 26 tests / 7 gates.
SealedAssetRegistry
AES-GCM delayed-key disclosure: AAD binding, entitlement+region scoping, transferable buffers. 27 tests / 7 gates.
LoomForgeBridge
WASM-SIMD physics: strict build contract, single-source memory layout, double-buffered phase barrier. 26 tests / 6 gates.
GlobalStateLedger
Spatio-temporal persistence: Lamport ordering, per-component merge rules, auditable compaction. 27 tests / 7 gates.
LoomStudioOrchestrator
AI Director governance: telemetry epochs, batched SLM queries, fact-tier guard, reserved index 0. 29 tests / 6 gates.

04BWave 3.0 - Living Persistent World + cross-language core

The engine becomes a deterministic, server-authoritative world engine: ONE logic core, compiled to a Rust workspace and bound to four surfaces - byte-identical from the same seed, pinned by shared golden vectors. Same invariants throughout: no RNG outside the seeded PRNG, no wall clock, fail-closed at every boundary.

Any-System ruleset AST
Express rules as DATA: d20 delta / derived checks, plus PbtA-style 2d6 moves and d100 roll-under checks via the v2 node families. Roll vs DC -> degree -> mutations, integer math + floor_div toward -inf, fail-closed static validation before any RNG draw. No untrusted code execution.
Snapshot + replay
Pure content state_hash (HMAC over canonical, integer-only JSON). A world persists compactly and reconstructs from a verified snapshot + the events after it - provably equal to replay-from-genesis.
Epoch world-tick
The between-session tick: offline factions act deterministically against a PRNG seeded purely from (worldId, epoch), fail-closed (a rejected proposal consumes zero RNG), bounded catch-up. Unit-vectored per primitive; the end-to-end suspend -> offline epochs -> verified resume flow is proven by the Plaza Persistent reference demo and soaked past 100 epochs in npm test.
WorldSession lifecycle
Suspend packs a world into a verifiable bundle that embeds the chain's structural seal plus a signed identity binding (bundle format v3); resume verifies the binding first (leading-truncation + cross-world splices rejected), verifies the seal fail-closed (end-truncated, seal-less, or forged-seal bundles rejected), replays the HMAC chain tail, rejects time-travel, and fast-forwards bounded offline epochs.
Real-time multiplayer core
Server-authoritative command-frame tick (commands sorted by a numeric-aware player id, resolved through the AST, rate-capped), client-side rollback reconciliation, 2-level Merkle region hashing - both the server-side leaves/root primitive and the fail-closed partial-sync client, proven end-to-end by the Plaza Persistent reference demo. The client can predict but never forge an outcome.
Four binding surfaces
A Rust workspace (loom_math / loom_events / loom_snapshot / loom_ruleset / loom_epoch / loom_session / loom_frame) bound to WASM, a native PyO3 Python binding (built from source with maturin - the wheel is not yet on PyPI), and a panic-guarded C ABI (Unity / Godot / Go) - each verified against the same golden vectors.

05Authors

Engineered by
Misha Mitiev (@sadhaka)
with Claude Opus 4.7 / Anthropic
  • Pair-engineered architecture, primitive design, code review
  • Deterministic-replay-first stance, var-only browser source
  • 146 versions since v0.10.0 land Pure Addition
Niche
TS engine for AI-driven worlds. The differentiation is not engine breadth (Babylon, Excalibur, Phaser, Kaboom all do that well already) but:
  • Cross-session NPC memory via NarrativeMemory (v1.3.5)
  • Asymmetric relationships via RelationshipGraph + EmotionState
  • Deterministic replay via mulberry32 + clock seams