Getting started

Architecture and ownership

The deliberate boundaries that make Yuka Kit deterministic, composable, and safe to integrate.

Yuka Kit is a decision library, not a game framework. Its design keeps every important authority boundary explicit.

LayerYuka Kit ownsYour game owns
World lifecyclePer-world helpers and registriesScene creation, disposal, entity identity
DecisionsSteering, FSM transitions, evaluator arbitration, intentsInput observations and acceptance rules
SimulationDeterministic utilities and state snapshotsPhysics, navigation meshes, damage, animation, rendering
PersistenceClosed-schema validation and snapshotsStorage, migration policy, save/load orchestration
CommandsTyped proposal and envelope validationAuthorization, side effects, network dispatch

One world, explicit lifecycle

Create EntityManager and BrainRegistry instances per world. Register an entity only in the world that will step it. On a scene transition, remove entities and call BrainRegistry.reset() rather than retaining module-level state. This makes test worlds, multiplayer rooms, and reloads independent.

Deterministic inputs, authored outcomes

Supply observations from authoritative game state: positions, health, cooldowns, map tags, and action availability. The library turns those inputs into state transitions, encounter plans, routine decisions, or intents. Your game decides whether and how an intent succeeds. That separation means an unsuccessful action cannot be silently treated as completed.

Coordinate convention

Yuka's 2D convention still uses Vector3; keep y at 0 and use x / z for the ground plane. astar() is the exception: it consumes a rectangular grid[y][x] with 0 as walkable and returns [x, y] cells.

Public surface

Only these package entry points are supported:

import {} from '@jbdevprimary/yuka-kit';
import {} from '@jbdevprimary/yuka-kit/koota';
import {} from '@jbdevprimary/yuka-kit/solo';

The root is framework-agnostic. Koota is optional; Solo is an adapter boundary for RPGJS command dispatch. Internal file paths and the package build layout are intentionally not stable API.