Kiran
Kiran (Sanskrit: किरण — ray of light) — AI-native game engine for AGNOS
Modular game engine built in Rust, designed for AI-driven game development. Composes AGNOS shared crates for physics (impetus), math (hisab), audio (dhvani), rendering (soorat), optics (prakash), multiplayer (majra), and scripting (kavach).
For AI NPCs and headless simulation, see joshua. For the visual editor, see salai.
Architecture
kiran (engine orchestration)
├── hisab — math (vectors, geometry, transforms)
├── impetus — physics (rigid bodies, collision, particles)
├── soorat — rendering (wgpu, PBR, shadows, animation, terrain, text, UI)
├── prakash — optics (ray tracing, spectral color, PBR math)
├── dhvani — audio (spatial, DSP, mixing)
├── majra — multiplayer (pub/sub, relay)
├── kavach — scripting sandbox (WASM)
└── bhava — NPC emotion/personality [planned]
Modules
| Module | Feature | Description |
|---|---|---|
world |
core | ECS world, Vec arena O(1) storage, scheduler, change detection |
scene |
core | TOML scene format, hierarchy, prefabs, materials |
input |
core | Keyboard, mouse, edge-triggered queries |
render |
core | Renderer trait, camera controllers, NullRenderer |
gpu |
rendering |
soorat GPU backend (sprites, meshes, PBR, shadows, animation) |
audio |
audio |
dhvani spatial audio, sound triggers |
physics |
physics |
impetus bridge, raycasting, debug shapes, 3D |
net |
multiplayer |
majra relay, state sync, snapshots, deltas |
script |
scripting |
kavach WASM execution, message passing |
ai |
ai |
daimon/hoosh client |
reload |
core | Scene + shader hot reload, file watcher |
profiler |
core | Frame timing, per-system cost, slow frame detection |
asset |
core | Asset registry, typed handles, hot reload integration |
Quick Start
use ;
use ;
let scene = load_scene.unwrap;
let mut world = new;
spawn_scene.unwrap;
let mut scheduler = new;
scheduler.add_system;
loop
Feature Flags
| Feature | Dependency | Description |
|---|---|---|
audio |
dhvani | Spatial audio, sound triggers |
physics |
impetus | Rigid bodies, collision, raycasting |
physics-3d |
impetus (3D) | 3D physics backend |
rendering |
soorat | GPU rendering (PBR, shadows, animation, terrain, text, UI) |
scripting |
kavach, tokio | WASM script execution via wasmtime |
multiplayer |
majra | Networked state sync, relay messaging |
ai |
reqwest, tokio | Daimon/hoosh AI integration |
full |
all above | Everything |
Examples
Building
License
GPL-3.0 — see LICENSE.