Project note
Composable Narrative Game Engine
An experiment in making a narrative game system reusable: a deterministic rules layer handles play, while a separate world graph defines the people, places, conditions, and consequences of a particular setting.
Context
Most games bind their mechanics, setting, and individual adventure content together. This project asks whether a cooperative narrative game can keep its core rules stable while different creators build their own worlds, characters, scenarios, and endings as structured content.
Approach
I used Codex to develop an executable prototype around a deterministic kernel, a fixed ruleset, a content-pack compiler, a simulator, and a browser greybox. A world is represented as structured content with typed relationships, states, actions, and outcomes. The longer-term companion concept, WorldGraph Studio, is an authoring environment for building, testing, and publishing those world graphs without requiring a creator to work directly in raw data files.
What happened
The work has produced a prototype that can load a compiled scenario, validate actions, resolve simultaneous player choices, preserve private information, and reach a defined ending. It has also established the boundary between a reusable rules system and the world-specific material that gives a game its identity.
Working with AI
Codex helped turn a large design problem into smaller packages, tests, and decision documents. The important direction remained human: defining which rules must stay deterministic, what content creators may configure, how player information should be bounded, and where an AI authoring tool can propose work without becoming the authority on what is true in a game world.
Key details
- The engine keeps its rules deterministic while settings and scenarios are supplied as structured content packs.
- A world graph can describe people, places, relationships, states, actions, and possible outcomes.
- WorldGraph Studio is the planned tool for helping independent creators build and test that content visually.
Tools and method
The prototype is a TypeScript workspace with a deterministic runtime kernel, ruleset, pack compiler, simulator, room service, and responsive browser client. World content is compiled from structured data into an immutable pack, while a separate session overlay records the changing state of play.
Lessons learned
Separating engine from setting requires more than keeping content in a different folder. The boundary has to be expressed as a clear contract: which facts are declarative content, which rules are executable, how state changes are validated, and how a published world can remain portable and testable.
Limitations
This is a working prototype, not a finished game engine or an independent publishing platform. The authoring application is still a design direction, and the current rules need structured human playtesting before the system can be treated as stable.
Next step
Run guided playtests of the existing scenario, refine the rules from observed player behavior, and prove a complete authoring loop in which a small world graph can be edited, validated, compiled, and played.