Demos & Showcases

🎮 16 Runnable DemosAI-Native Interactive Visual Engine

nAIVE - Demos & Showcases

AI-Native Interactive Visual Engine — 16 Phases, 16 Runnable Demos

Flagship Demo

The Relic — Complete Dungeon Crawler Phase 9

"Every system in the engine, working together in one playable experience."

A first-person dungeon crawler that exercises all core engine phases simultaneously. Navigate a torch-lit stone dungeon, open a physics-driven gate, battle a patrolling goblin guardian with a finite-state-machine AI, and claim the golden relic. Deferred HDR lighting with flickering torchlight, Rapier 3D physics, Lua-scripted entity behaviors, event-driven game logic, and a full win/lose condition — all defined in pure YAML + Lua, zero recompilation needed.

# Play The Relic naive --scene scenes/relic.yaml
  • 15 entities orchestrated by 6 Lua scripts
  • Guardian AI: patrol → detect → chase → melee attack FSM
  • Interactive door with swing animation (press E)
  • 4 torches with layered sine-wave flicker (each uniquely phased)
  • Player FPS controller: WASD, sprint, jump, interact, melee combat
  • Full event schema: player.damaged, door.opened, enemy.defeated, game.level_complete

Visual Showcases

Cinematic and interactive experiences that push every engine system to the limit.

TITAN — Colosseum of Light Phase 15

"100+ entities, 32 lights, the most ambitious scene in the engine."

A grand colosseum showcasing the engine at full throttle. A levitating gold titan sphere sits at the heart, surrounded by 16 outer pillars, 8 obsidian sentinels, dual orbital rings of gold and platinum spheres, 4 gemstone pedestals (ruby, sapphire, emerald, ice), spiraling ember and void cubes with rainbow emission waves, and copper/steel outer orbits. 32 dynamic lights paint the scene with dramatic warm/cool contrasts. FXAA anti-aliasing keeps every edge clean.

# Enter the colosseum naive --scene scenes/titan.yaml
  • 100+ entities across 7 distinct visual layers
  • 15+ unique materials (titan_gold, platinum, ruby, sapphire, emerald, ice, ember, void)
  • 32 dynamic lights: pillar, core glow, accent, rim, gem, dramatic spots
  • Dual orbital rings: 12 gold spheres + 8 platinum spheres in opposing orbits
  • Spiraling ember/void cubes with rainbow emission wave animation
  • FXAA anti-aliasing + shadow mapping + bloom
GENESIS — The Birth of a World Phase 13

"65 entities, 24 lights, a multi-act creation story told in PBR and light."

A cinematic visual showcase that unfolds like a creation myth. A central spark core pulses with emission, concentric rings of chrome and copper orbs orbit at different speeds, 8 obsidian pillars rise from underground, and a Gaussian splat nebula swirls at the center — all choreographed by keyframe-driven camera moves with smooth Hermite interpolation. Bloom, HDR tonemapping, and shadow mapping bring it to life.

# Watch the birth of a world naive --scene scenes/genesis.yaml
  • 65 entities orchestrated by 8 Lua scripts
  • 12 unique PBR materials (genesis_core, chrome, copper_ring, steel_ring, obsidian, 7 neons)
  • 24 dynamic point lights (key, fill, pillar, core glow, accent, rim)
  • Pillar rise animation with easing, roughness sweep, emissive cycle
  • Cinematic camera with keyframe choreography (60s loop)
  • Directional sun with shadow mapping + Gaussian splat nebula
AVOID — Cosmic Gaussian Splatting Phase 15

"Minimalist void. Floating monoliths. Procedural splats. Pure atmosphere."

A dark, atmospheric showcase focused on Gaussian splatting compositing. Floating void monolith pillars drift around a procedural splat nebula, joined by void crystals, ice shards, obsidian fragments, and neon accent orbs. Ultra-low ambient lighting (0.005) creates a deeply immersive cosmic void. 16 dynamic lights add subtle color washes that breathe and pulse.

# Drift through the void naive --scene scenes/void.yaml
  • 40+ entities: monoliths, crystals, stars, orbs, ice shards, debris
  • Procedural Gaussian splat nebula at center
  • Ultra-dark ambient (0.005) with cold blue directional light
  • 16 dynamic lights with slow breathing pulse
  • Void drift animation: slow cosmic movement on all axes
  • 10+ unique materials (void_monolith, void_crystal, void_star, chrome, ice)
BINFERNO — Combat Arena Phase 15

"FPS combat meets hellfire lighting. Fight 6 demons in a lava-lit arena."

A playable first-person combat arena that combines the physics and scripting systems with intense visual design. Navigate a 32×32 arena with 4 lava pits at the corners, 4 iron pillars for cover, and 6 demon enemies with AI combat logic. Health pickups float and bob, torches flicker with layered sine waves, and orange-red hellfire sunlight casts dramatic shadows across everything.

# Enter the inferno (WASD + mouse, left-click attack) naive --scene scenes/inferno.yaml
  • FPS player: 4.5 m/s move, 1.6× sprint, 6.0 jump impulse
  • 6 demon enemies with AI combat (patrol, chase, attack)
  • 4 lava pit hazards with animated glow effects
  • 2 floating health pickups with bob animation
  • 16 dynamic lights: torches, lava glow, accent overhead, central arena
  • Physics-enabled gravity combat with character controller
CNeon Dreamscape Phase 12

"A dark club with 6 neon pillars and floating emissive cubes."

A moody neon-lit environment with 6 pillars arranged in a hexagonal pattern, each in a different neon color (pink, cyan, purple, gold, blue, green). 3 floating emissive cubes bob gently overhead while 6 pulsing neon point lights wash the dark floor with shifting color. The cinematic camera sweeps through the space in a smooth orbit.

# Enter the dreamscape naive --scene scenes/neon_dreamscape.yaml
  • 15 entities: 6 neon pillars, 3 emissive cubes, 6 neon lights
  • 6 neon colors: pink, cyan, purple, gold, blue, green
  • Floating cubes with smooth vertical bob animation
  • Ultra-low ambient (0.01) for dramatic neon contrast
  • Pulsing point lights with intensity modulation
DPBR Material Gallery Phase 12

"25 spheres, every combination of metallic and roughness."

A material science showcase presenting a 5×5 grid of PBR spheres. Rows sweep metallic from 0.0 (dielectric) to 1.0 (full metal). Columns sweep roughness from 0.0 (mirror) to 1.0 (fully diffuse). Four colored key lights illuminate the grid from different angles, revealing how Cook-Torrance GGX lighting responds to each material parameter combination. Interactive physics with ball collision sound effects.

# Explore the PBR parameter space naive --scene scenes/pbr_gallery.yaml
  • 25 unique PBR materials (5× metallic × 5× roughness)
  • Cook-Torrance GGX shading with Fresnel and geometry terms
  • 4 key lights: warm, cool, accent (pink), fill (green)
  • Circular orbit camera for all-angle viewing
  • Interactive physics with collision audio feedback
ECosmic Splats Phase 4

"A procedural galaxy, a floating crystal, and 4 colored lights."

The original Gaussian splatting demo. A procedural splat galaxy rotates at the origin while a cyan neon crystal bobs gently above a dark pedestal. Four colored point lights (purple, blue, red-orange) create a cosmic atmosphere. Simple but foundational — the scene that proved splat-mesh depth compositing works.

# The original splat showcase naive --scene scenes/cosmic_splats.yaml
  • Procedural Gaussian splat galaxy at origin
  • Cyan neon crystal with 45° rotation and bob animation
  • 4 colored point lights for cosmic atmosphere
  • Splat-mesh depth compositing proof-of-concept

Rendering Showcases

From raw triangles to a full deferred HDR pipeline with Gaussian splatting compositing.

1Deferred Rendering Pipeline Phase 3

"A full GPU pipeline described in 73 lines of YAML."

The entire multi-pass rendering pipeline is data-driven: shadow pass, G-Buffer geometry, Gaussian splat, deferred lighting (Cook-Torrance GGX), bloom, tonemapping, and FXAA — all wired through pipelines/render.yaml. Add or reorder passes without touching Rust code.

# The pipeline YAML drives everything cat project/pipelines/render.yaml # 7 passes: shadow → geometry → splat → lighting → bloom → tonemap → fxaa
  • G-Buffer: albedo (RGBA8), normals (RGBA16F), depth (D32F)
  • Cook-Torrance GGX PBR with shadow mapping
  • HDR bloom extraction + Reinhard tonemapping + FXAA
  • Shader reflection auto-generates bind group layouts
2Gaussian Splatting + Mesh Compositing Phase 4

"3D Gaussian splats and traditional meshes, depth-composited in a single frame."

Load .ply 3D Gaussian Splat captures alongside conventional glTF meshes. The engine depth-composites both representations so splats and meshes coexist naturally — a NeRF-era mesh sitting inside a traditionally-modeled dungeon room.

# Splat compositing test scene naive --scene scenes/splat_test.yaml
  • Loads .ply splat files with spherical harmonics, opacity, scale
  • CPU-side per-frame depth sorting for correct alpha blending
  • GPU storage buffers for splat data
  • Splat depth + mesh depth merged in the lighting pass
3SLANG Shader Hot-Reload Phase 1

"Edit a shader, save the file, see the result on the next frame."

Shaders are written in SLANG (with WGSL fallback) and automatically recompiled when the file changes on disk. The file watcher detects modifications and the pipeline re-creates GPU state seamlessly — no restart, no stutter.

# Edit a shader while the engine runs $EDITOR project/shaders/passes/deferred_light.slang # Changes appear in real time
  • SLANG → WGSL cross-compilation via shader-slang
  • notify-based file watcher triggers recompilation
  • Graceful fallback: invalid shader keeps the last good version
  • Works for all 7 pipeline passes simultaneously
4Dynamic Torch Lighting Phase 7 + 9

"Four torches, four unique flickers, one atmospheric dungeon."

Each torch runs an independent Lua script with a random phase offset and layered sine waves (3 frequencies) producing organic light flicker. The deferred lighting pass accumulates all point lights with range-based attenuation.

# torch_flicker.lua: layered sine waves local f = sin(t)*0.5 + sin(t*2.3)*0.3 + sin(t*5.7)*0.2
  • Per-torch random phase offset (no two torches flicker alike)
  • Warm color [1.0, 0.7, 0.3] with 10m range
  • Intensity clamped to minimum 0.5 (never fully dark)
  • Deferred pipeline: lights are free regardless of scene geometry

UI & Audio Showcases

Immediate-mode 2D overlay, bitmap font text, screen effects, and spatial audio — all driven from Lua.

FUI & Text Rendering Demo Phase 16

"Immediate-mode 2D overlay: text, rects, animations, and screen flash."

A comprehensive showcase of the Phase 16 UI system. Title bar, stats HUD panel with live FPS and score, text size & color palettes, animated pulsing and rainbow text, a moving progress bar, auto-spawning entities with screen flash effects, and visibility toggling — all rendered as a 2D overlay on top of the 3D scene using a 6×8 bitmap font atlas.

# Run the UI showcase naive --scene scenes/ui_demo.yaml
  • Bitmap font atlas: 95 ASCII glyphs, arbitrary text size scaling
  • Colored rectangles with alpha blending for panels and bars
  • Screen flash effect with auto-fade
  • Runtime entity spawning and visibility toggling from Lua
  • Animated text: pulsing alpha, rainbow color cycling, progress bar
GGrid UI Demo — Snake Sweeper Phase 16

"Snake meets Minesweeper on a dynamic 7×7 grid with numbered tiles."

A playable prototype combining Snake and Minesweeper mechanics. A 7×7 grid of tiles is spawned at runtime via entity.spawn(). An auto-walking snake reveals tiles, showing Minesweeper-style numbers (1-4) as UI text overlays. Hitting a mine triggers a screen flash and game-over state. Tile emission colors change dynamically based on revealed content. Top-down camera with full HUD overlay.

# Play Snake Sweeper naive --scene scenes/grid_ui_demo.yaml
  • 49 tiles + snake head spawned at runtime from Lua
  • Minesweeper number overlay using screen-space ui.text()
  • Dynamic tile emission: green (safe), colored (numbered), red (mine)
  • Game state machine: playing → lost with score tracking
  • Auto-walking snake with wall-bounce direction changes
HAudio Test — Snake Sweeper SFX Phase 16

"Background music, timed sound effects, and visual audio feedback."

Tests MP3 audio playback using real game assets from a snake/minesweeper game. Background music fades in over 2 seconds, then a timed schedule triggers sound effects — eat (food pickup), explosion (mine hit), and death (game over) — each at different volumes. Every sound event gets visual feedback: screen flash, a HUD panel showing the current audio state, a progress bar, countdown to the next SFX, and a fake waveform visualization.

# Test audio playback with real game SFX naive --scene scenes/audio_test.yaml
  • 4 MP3 files: music.mp3 (background loop), eat.mp3, explosion.mp3, death.mp3
  • Kira audio engine with symphonia MP3 decoder
  • Music fade-in (2s) + SFX at scheduled intervals with varied volumes
  • Screen flash per sound type: green (eat), orange (explosion), red (death)
  • Full UI overlay: audio status panel, file legend, progress bar, waveform vis
  • 3 indicator spheres bob in sync with sound events

AI & Automation Showcases

The "AI-Native" in nAIVE. External AI agents can observe, control, and test the game.

5Headless AI Playtesting Phase 10

"A Lua script plays through the entire dungeon without a screen."

Run the complete game loop headlessly — no GPU, no window. Lua test scripts inject synthetic inputs, advance time, assert game state, and verify the full gameplay loop: movement, door interaction, combat, item pickup, and win conditions.

# Run the full automated test suite naive test tests/test_relic.lua # 5 tests: movement, bounds, scripts, state, playthrough
  • test_full_playthrough: walks to door, opens it, collects relic
  • test_player_stays_in_bounds: verifies all 4 walls contain the player
  • test_scripts_running: confirms guardian patrols + relic bobs
  • test_game_state_initialized: asserts HP=100, game_over=false
  • Frame-stepping and time-warping for deterministic tests
6MCP Server — AI Controls the Game Phase 8

"Claude (or any LLM) can list entities, move objects, and inject input — live."

The MCP server bridges JSON-RPC 2.0 over stdin/stdout to the engine's Unix domain socket. An AI agent can query every entity, modify transforms, spawn/destroy objects, emit events, inject keyboard/mouse input, and pause/resume the game — all through standard tool-use.

# 9 MCP tools available: naive_list_entities # See all entities + tags naive_query_entity # Read any component naive_modify_entity # Change transforms, lights naive_spawn_entity # Create new entities live naive_destroy_entity # Remove entities naive_emit_event # Fire game events naive_query_events # Read event log naive_inject_input # Press keys, move mouse naive_runtime_control # Pause / resume / status
  • Full MCP protocol compliance (2024-11-05)
  • Unix domain socket IPC at /tmp/naive-runtime.sock
  • AI can play the game, design levels, or QA test
  • Real-time bidirectional game state access
7Command Socket Live Control Phase 8

"Pipe JSON into a socket, reshape the game world in real time."

The engine listens on a Unix domain socket for JSON commands. Any process — a shell script, a Python notebook, a monitoring dashboard — can query and mutate the running game without any SDK or library dependency.

# Teleport the player from the command line echo '{"cmd":"modify_entity","entity_id":"player","components":{"transform":{"position":[0,1,-6]}}}' \ | socat - UNIX:/tmp/naive-runtime.sock # List all entities echo '{"cmd":"list_entities"}' | socat - UNIX:/tmp/naive-runtime.sock
  • Zero-dependency JSON protocol over Unix sockets
  • Thread-safe: commands queued to main thread via mpsc channel
  • Query + mutate any entity component
  • Spawn/destroy entities at runtime
8Guardian Goblin FSM AI Phase 6 + 9

"73 lines of Lua, one convincing enemy."

The guardian goblin demonstrates a complete finite-state-machine AI written entirely in Lua. It patrols side-to-side, detects the player within 8m, chases at double speed, and attacks in melee range on a cooldown timer. It takes damage and can be defeated.

# Guardian state machine (simplified) if dist < attack_range then -- Melee attack elseif dist < detect_range then -- Chase player else -- Patrol side to side end
  • 3 states: patrol (1.5 m/s), chase (3.0 m/s), attack (20 dmg)
  • Detection range: 8m, attack range: 1.8m
  • Cooldown-based attack interval (1.5s between strikes)
  • Emits events: player.damaged, player.died, enemy.defeated

Data-Driven Architecture Showcases

Everything is YAML + Lua. The Rust engine is the runtime; the game is pure data.

9Scene-as-YAML Phase 2

"250 lines of YAML defines an entire playable dungeon."

The Relic scene declares 15 entities — player, walls, floor, ceiling, pillars, gate, torches, guardian, relic, pedestal — entirely in YAML. Each entity specifies its transform, mesh, material, collider, script, and light components declaratively. Swap the scene file, get a completely different game.

# Entity definition in scenes/relic.yaml - id: guardian tags: [enemy, guardian] components: transform: position: [0, 0.75, -6] scale: [0.8, 1.5, 0.8] mesh_renderer: mesh: assets/meshes/cube.gltf material: assets/materials/goblin.yaml script: source: logic/guardian.lua
  • Scene, materials, pipeline, input bindings, events — all YAML
  • Hot-reload: edit relic.yaml and the scene rebuilds
  • ECS-style component composition: mix and match freely
  • Hierarchical entity system via hecs
10Live Script Hot-Reload Phase 6

"Edit guardian.lua, save, watch the goblin change behavior mid-game."

Every Lua script is watched for changes. On modification, the VM reloads the script, calls on_reload() if defined, and the entity picks up new behavior instantly. Iterate on AI logic, door animations, or pickup mechanics without restarting.

# While the game is running: $EDITOR project/logic/guardian.lua # Change detect_range from 8 to 20 # Guardian immediately becomes more aggressive
  • Per-entity sandboxed Lua environments (mlua metatables)
  • Dangerous stdlib disabled: no os, io, loadfile, dofile
  • Lifecycle hooks: init(), update(dt), on_reload()
  • Lua API: entity, input, events, game state, tween, audio, ui
11Event Bus with Schema Validation Phase 7

"Type-checked game events defined in YAML, logged in a ring buffer."

Game events (player.damaged, door.opened, item.collected, enemy.defeated, game.level_complete) are defined in an event schema with required fields. The event bus validates payloads at emit-time, logs to a ring buffer, and dispatches to Lua listeners.

# events/schema.yaml player.damaged: description: "Player took damage" fields: [amount, source] # Emitted from Lua: events.emit("player.damaged", {amount=20, source="guardian"})
  • 8 event types with field validation
  • Ring buffer logging (bounded memory)
  • Queryable from MCP: naive_query_events
  • Drives game logic: death, victory, door state
12Physics Playground Phase 5

"Rapier 3D physics with character controller, slopes, and autostep."

The physics system integrates Rapier 3D with box, sphere, and capsule colliders. The player character controller handles slope climbing, automatic step-up over small obstacles, and ground snapping. Trigger volumes fire enter/exit events.

# Physics test scene naive --scene scenes/physics_test.yaml
  • Character controller: 0.3m radius, 1.8m height, 0.3m step
  • Gravity: -9.81 m/s, jump impulse: 6.0
  • 60 Hz physics tick, frame-rate independent
  • Collision shapes defined declaratively in scene YAML

Quick Reference: All Runnable Demos

Install with brew install poro/tap/naive, then run these from the repository’s project/ folder, or browse the 19 built-in demos with naive demo.

# Demo Command GPU Phases
1 The Relic (full game) naive --scene scenes/relic.yaml Yes 1-9
2 TITAN — Colosseum of Light naive --scene scenes/titan.yaml Yes 1-15
3 GENESIS — Birth of a World naive --scene scenes/genesis.yaml Yes 1-13
4 VOID — Cosmic Splatting naive --scene scenes/void.yaml Yes 1-4, 6-7, 15
5 INFERNO — Combat Arena naive --scene scenes/inferno.yaml Yes 1-9, 15
6 Neon Dreamscape naive --scene scenes/neon_dreamscape.yaml Yes 1-3, 6-7, 12
7 PBR Material Gallery naive --scene scenes/pbr_gallery.yaml Yes 1-3, 11-12
8 Cosmic Splats naive --scene scenes/cosmic_splats.yaml Yes 1-4
9 Splat Compositing Test naive --scene scenes/splat_test.yaml Yes 1-4
10 Physics Playground naive --scene scenes/physics_test.yaml Yes 1-5
11 UI & Text Rendering Demo naive --scene scenes/ui_demo.yaml Yes 1-3, 6, 16
12 Grid UI Demo (Snake Sweeper) naive --scene scenes/grid_ui_demo.yaml Yes 1-3, 6, 16
13 Audio Test (Snake Sweeper SFX) naive --scene scenes/audio_test.yaml Yes 1-3, 6, 11, 16
14 Headless Test Suite naive test tests/test_relic.lua No 2, 5-7, 10
15 MCP Server cargo run --bin naive_mcp No (bridge) 8
16 Socket Live Control echo '{"cmd":"list_entities"}' | socat - UNIX:/tmp/naive-runtime.sock Engine running 8
17 Havoc — 50,000-unit GPU swarm battle naive --scene scenes/tier4_havoc.yaml Yes Tier 4

Suggested Live Demo Script (12 minutes)

  1. Launch TITAN — naive --scene scenes/titan.yaml. Let the cinematic camera sweep through the colosseum. Point out the 100+ entities, dual orbital rings, gemstone pedestals, and 32 dynamic lights.
  2. Switch to GENESIS — naive --scene scenes/genesis.yaml. Show the multi-act creation story: spark core, rising pillars, orbiting rings, and Gaussian splat nebula.
  3. Enter the VOID — naive --scene scenes/void.yaml. Demonstrate Gaussian splatting composited with mesh objects in a dark cosmic environment.
  4. PBR Gallery — naive --scene scenes/pbr_gallery.yaml. Show the 25-sphere metallic/roughness grid proving Cook-Torrance GGX correctness.
  5. Play The Relic — naive --scene scenes/relic.yaml. Walk around the dungeon, open the physics-driven gate (press E), fight the guardian goblin, collect the golden relic.
  6. Fight in INFERNO — naive --scene scenes/inferno.yaml. Show FPS combat with 6 demon enemies, lava pits, health pickups, and hellfire lighting.
  7. UI Demo — naive --scene scenes/ui_demo.yaml. Show the 2D overlay system: HUD panels, animated text, progress bars, entity spawning, screen flash.
  8. Snake Sweeper — naive --scene scenes/grid_ui_demo.yaml. Show runtime entity spawning and UI text overlay on a dynamic game grid.
  9. Audio Test — naive --scene scenes/audio_test.yaml. Demonstrate MP3 playback with background music, timed SFX, and visual audio feedback.
  10. Hot-reload a shader — While the game runs, edit deferred_light.slang (change light color or attenuation). Save. Watch the lighting change in real time.
  11. Hot-reload a script — Edit guardian.lua, double the detect range. Save. The goblin immediately becomes more aggressive.
  12. Socket control — In a second terminal, use socat to teleport the player, spawn a new light, or list all entities via JSON commands.
  13. Headless test — Kill the window. Run naive test tests/test_relic.lua. The entire game plays itself with no GPU. Show all 5 tests passing.

What Makes nAIVE Brilliant

Zero-compile iterationScenes, materials, pipelines, shaders, scripts, input bindings, and event schemas are all hot-reloadable data files.
AI-first architectureMCP server + command socket + headless mode = an AI agent can design, play, and QA-test a game without human intervention.
Cutting-edge renderingCook-Torrance GGX PBR, Gaussian splatting compositing, FXAA anti-aliasing, shadow mapping, bloom, and HDR tonemapping — all in a single data-driven pipeline.
Full game UIImmediate-mode 2D overlay with bitmap font text, colored rects, screen flash effects, and runtime entity spawning/destruction — all from Lua scripts.
Spatial audioKira audio engine with MP3/WAV support, music fade-in/out, one-shot SFX, spatial attenuation, and Lua script control.
From-scratch in RustNo Unity, no Unreal, no Bevy. Custom ECS, custom renderer, custom physics integration — all type-safe Rust.
16-phase engineeringEach phase builds cleanly on the last: window → scene → deferred → splats → physics → scripting → events → sockets → game → testing → PBR → bloom → genesis → rendering overhaul → advanced demos → UI overlay.