2024— · Early prototype · game
Light
An AI-native systemic narrative open-world RPG
LLMs act as the world's rational layer: quests, dialogue and consequences are generated live from world state. Narrative emerges from systems, not from a pre-written script tree.
- Role
- Founder / Lead Programmer — architecture and all C++ systems
- Tech stack
- Unreal Engine 5.7.1C++RAGLLM PipelineStateTreeLumenNanite
32,139
C++ LOC (main module)
120,486
Total LOC (incl. plugin & tools)
379
Git commits
51 / 293
UCLASS / UFUNCTION
24.0%
Test code share
Problem & Goal
Traditional RPGs rely on pre-written script trees: NPCs are omniscient but pretend not to be, quests are hand-authored, failure means reload. Light validates another path — narrative emerging from resource flows, power struggles and information asymmetry.
Current milestone: a 15–25 minute playable demo ("First Shift") proving the AI-driven loop.
World
Light City — a three-level underground city built in 2305, the last known human civilization. You play Extro Martinez, a maintenance worker in the Agricultural Layer, uncovering the truth of a sealed society.
Information Layer (200–500 people, the real seat of power), Industrial Layer (3,000–5,000), Agricultural Layer (30,000–50,000, the main stage).
Core Systems
- AI quest generation from live world state — not from preset pools
- Every dialogue line generated by the LLM from NPC personality, memory, emotion and information scope
- RAG world-anchoring: design docs chunked, vectorized, retrieved with clearance filtering
- Bounded NPC knowledge: spatial + social + official + personal channels; NPCs can lie, forget, misunderstand
- Consequence propagation: player actions persist into world state and are referenced by all later AI interactions
- World homeostasis: killed NPCs get replaced, damaged facilities repaired, security escalates
Architecture
Five-stage pipeline: designer framework → RAG knowledge layer → narrative arbitrator → NPC information-scope filter → LLM runtime, closing into the world feedback loop.
Async network subsystem calls Gemini 3.0 Flash via OpenRouter off the game thread; structured JSON responses update attitude, memory and behavior automatically.
Failure as Design
Failure is not Game Over but a permanent shift of world parameters. Every NPC can be attacked and killed — with systemic consequences.
Outcomes
- 32,139 LOC in the main C++ module; 120,486 LOC repo-wide; 379 commits
- 4 core subsystems live: world state, AI networking, quest pipeline, NPC system
- 32 automated test files — 24% of main-module code
- Custom McpAutomationBridge plugin: remote UE editor control over MCP