class

FWorldStateJournal

Records are MDF nodes from capture to save to overlay. They were text, so a save wrote each entity's state as a string, a load parsed every string back, and a binary save carried text inside it — about six times the parse cost of the node it already had. A save written that way still loads: its mdf strings are parsed once into nodes.

Module
Game
Header
#include "WorldState/WorldStateJournal.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
boolIsPersistenceEnabled
boolIsEmpty
voidClear
size_tTombstoneCount
size_tModifiedCount
size_tRuntimeSpawnCount
voidRecordDestroyed
boolIsDestroyed
voidRecordModifiedentityNode is the Entity node Scene::SerializeEntityStateToNode writes.
boolRecordModifiedFromTextThe old text record (an EntityState document), parsed once.
const MDF::MdfNode*FindModified
voidRecordRuntimeSpawn
voidRemoveRuntimeSpawn
const MDF::MdfNode*FindRuntimeSpawn
std::vector<EntityID>RuntimeSpawnsInCell
boolIsSuppressed
voidSetSuppressed
voidCaptureSector
std::vector<EntityID>CollectRuntimeDespawns
voidCaptureForSave
voidApplyEntityOverlays
voidApplyToScene
voidSerializeToNode
boolDeserializeFromNode
const std::unordered_set<EntityID>&Tombstones
const std::unordered_map<EntityID, MDF::MdfNode>&Modified
const std::unordered_map<EntityID, FRuntimeSpawn>&RuntimeSpawns
size_tByteSize
FWorldStateJournalSnapshotSnapshot

Function details

IsPersistenceEnabled

C++
static bool IsPersistenceEnabled()

IsEmpty

C++
bool IsEmpty() const

Clear

C++
void Clear()

TombstoneCount

C++
size_t TombstoneCount() const

ModifiedCount

C++
size_t ModifiedCount() const

RuntimeSpawnCount

C++
size_t RuntimeSpawnCount() const

RecordDestroyed

C++
void RecordDestroyed(EntityID id)

IsDestroyed

C++
bool IsDestroyed(EntityID id) const

RecordModified

C++
void RecordModified(EntityID id, MDF::MdfNode entityNode)

entityNode is the Entity node Scene::SerializeEntityStateToNode writes.

RecordModifiedFromText

C++
bool RecordModifiedFromText(EntityID id, const std::string& mdf)

The old text record (an EntityState document), parsed once.

FindModified

C++
const MDF::MdfNode* FindModified(EntityID id) const

RecordRuntimeSpawn

C++
void RecordRuntimeSpawn(EntityID id, const SectorCoord& cell, MDF::MdfNode tree)

RemoveRuntimeSpawn

C++
void RemoveRuntimeSpawn(EntityID id)

FindRuntimeSpawn

C++
const MDF::MdfNode* FindRuntimeSpawn(EntityID id) const

RuntimeSpawnsInCell

C++
std::vector<EntityID> RuntimeSpawnsInCell(const SectorCoord& cell) const

IsSuppressed

C++
bool IsSuppressed() const

SetSuppressed

C++
void SetSuppressed(bool suppressed)

CaptureSector

C++
void CaptureSector(Scene* scene, const SectorCoord& coord, const std::vector<EntityID>& roots)

CollectRuntimeDespawns

C++
std::vector<EntityID> CollectRuntimeDespawns(Scene* scene, const SectorCoord& coord) const

CaptureForSave

C++
void CaptureForSave(Scene* scene, bool pruneInvalidRuntimeSpawns)

ApplyEntityOverlays

C++
void ApplyEntityOverlays(Scene* scene, EntityID root)

ApplyToScene

C++
void ApplyToScene(Scene* scene)

SerializeToNode

C++
void SerializeToNode(MDF::MdfNode& out) const

DeserializeFromNode

C++
bool DeserializeFromNode(const MDF::MdfNode& node)

Tombstones

C++
const std::unordered_set<EntityID>& Tombstones() const

Modified

C++
const std::unordered_map<EntityID, MDF::MdfNode>& Modified() const

RuntimeSpawns

C++
const std::unordered_map<EntityID, FRuntimeSpawn>& RuntimeSpawns() const

ByteSize

C++
size_t ByteSize() const

Snapshot

C++
FWorldStateJournalSnapshot Snapshot(Scene* scene) const
Generated from WorldState/WorldStateJournal.h via game.json · Nov 5, 2026Version 1.0.0