There exist two equivalent definitions for a cosmos solvable:
- that part of the entire game’s replicated state which is in any way mutable by a solver;
- that, which stores entities, components, the cosmos clock and all caches inferred from the three.
Intuitively, it represents the part of the application model that continuously changes as the time flows forward.
It could be thought of as the “game world”.
State
An overview of the member fields of the class.
-
Significant
Represents the part of the cosmos solvable that is significant. It holds:
- All entities.
- All components.
- cosmos clock.
-
Inferred
The storage of all caches that are at any time regenerable from the contents of the significant field (given also the cosmos_common::significant).
-
guid_to_id
While this field is nothing else than a inferred cache, it is stored separately from the cosmos_solvable::inferred because quick guid-based access is often needed even when all other caches are temporarily destroyed, e.g. when preparing new significant state from a cosmic delta.