A structured, LLM-assisted RPG world engine.
Omnia is an experimental engine designed around a principle of separation of world simulation, game logic and language generation into distinct layers.
The goal here si to create persistant and scalable narrive worlds and not to rely on blown up prompts and let the LLM "hallucinate" game state.
All world data including characters, locations, items and the global timeline is stored as structured documents using Pydantic models. The LLM does not hold or remember the world. So this makes sure the output is consistent and scalable.
LLMs do not control movement, combat, item use, perception, or world updates. Validation is done by game engine algorithms and then the actions such as reachability checks, env constraints, time progression, etc are applied.
Instead of passing entire character histories or world information to the LLM, Omnia builds a "scene context" based on relevance depending on:
- characters in the shared location
- recent globaltimeline
- character-specific memories
- tiems or locations involved
- active objectives
The patch merging system is Omnia's mechanism for updating world state in a deterministic way based on deltas produced by the LLM. So, LLM output never directly mutates the databse and malformed output cannot corrupt state.
The LLM outputs structured data (JSON for example):
{
"intent": {
"character": "alina",
"action": "move",
"target": "observatory"
},
"patch": {
"characters": {
"alina": {
"traits": {
"curiosity": "+0.03"
},
"location_id": "observatory"
}
}
}
}
Sorry for this, it's just a rough sketch right now
It is the subsystem that makes the makes the world run autonomously. It is responsible for:
- Updating NPC states
- Time Advancement
- Triggering autonomous actions
- Processing cause and effect
- Running Background simulations
A tick is usually scenario dependent but fundamentally a discrete unit of simulated time that are processed asynchronously. This can be set to static intervals such as 1 minute, 5 minutes or dynamically based on events.
-
- Update
world.current_dateandworld.current_time - Global Timeline Entries
- Cooldown/timers
- Update
-
- Build a scene context for each actve NPC
- Reun an intent LLM do determine next move
- Validate intent using engine
- Update NPC Memory (observation, interation, impression)
-
- Weather updates
- Time of day updates
- Resource Respawn (depending on scenario)
- Structural decay
- World events
Full intelligence for all NPCs is not computed every tick. Instead, a tiered system of simulation is implemented, similar to how LODs (Level of Detail) are used for textures in 3D games:
Is generally used for entities that are not in the current context. Their general metadata like location, last known state, etc are stored until a character from higher tiers mentions them.
Applied to entities that are in the same region but not interacting or those that are not important to the context. For them, only deterministic rule logic is applied:
- State Changes (attributes, etc)
- Tasks progress
- Other timers and signals
Conditionally applies to entities that are relevant to nearby story beats or are in active locations. They may also be near the protagonist or participating in a major event.
These entities conditonally get LLM driven decisions usually after a fixed set of intervals (like 10 ticks) or when an event triggers them, etc.
These ticks can be stochastic, for example for 10 entities 3 are run on tick 0 4 next tick and then 3 later.
Since LLM API calls are not instant, if the the game loop runs at 60 FPS, an LLM call taking 200ms will de-sync the simulation. So we need to have some sort of time buffer (maybe playing an 'idle' animation while in a thinking state) until the first couple of tokens arrive.
This applies only to -
- Story critical characters
- Entities directly interacting with the user controlled character
They get the full scene context, intent generation and patch merging.


