Data Lens Table
Note: These tools are in preview We follow a “dogfood” development approach—these tools are actively used and developed within our current WIP games. They are mature enough to share with our GitHub and Patreon supporters, so their documentation is provided here for early adopters.
The Data Lens Table is the core structure behind our emergent simulation framework — a unified data source used to model everything from NPCs and mobs to factions, villages, and districts. While currently visible and used directly for development and testing, the long-term plan is for it to become a behind-the-scenes construct, accessible only through the Data Lens Subsystem and its IProcessor
s.
What matters most now is the shape of the data, as it defines what the system can and cannot do. Here’s a breakdown of the core features:
ID
Every record in a table is assigned a unique ID
, which allows other records to reference it directly, independent of row index or table position. This makes insertions and deletions safe and enables flexible, dynamic record relationships.
Attributes
Attributes
are int32
scalar values used to store basic data like health, level, rank, or currency. We don’t use floats for precision reasons — instead, precision is handled via queries. For example, 100 HP with two decimal points of precision would be stored as 10000
. The system then divides appropriately when presenting the value. This ensures fast, stable maths and eliminates float drift in critical simulations.
Related Records
This is an array of FRecordAddress
structs, allowing each record to reference any number of other records, across types and tables. This is the mechanism for modelling relationships like family ties, faction memberships, debts, rivalries, etc. Importantly, these relationships are record-local, meaning each record maintains its own perspective of the relation.
Traits
Traits are powered by Unreal’s FGameplayTagContainer
, providing a flexible, set-based tagging system to define what a record “is” — e.g. its class, race, skills, roles, or states. This supports fast queries and layered systems built on well-understood gameplay tag principles.
Towards Emergent Simulation
The vision for the Data Lens system is a living simulation, where data can change, grow, and conflict. The inclusion of record-local related records enables imperfect data, an essential trait of any emergent system.
For example, NPC A might think NPCs B and C owe it 100 gold. B may be unaware of the debt. C might claim it was only 95, owed to a different NPC entirely. There’s no system-wide “truth” unless your processors enforce one. Instead, each record has its own perception of reality, making complex social, political, and economic behaviours possible.
You can opt into “truthful” systems, but you’re not required to. This flexibility makes the Data Lens Table not just a structure, but a substrate for emergence, simulation, and storytelling.
Last updated