Skip to content

Serialization and EngineState

Isthimius edited this page Jun 22, 2026 · 1 revision

EngineState is Gondwana’s snapshot-and-restore mechanism for runtime state. It is a structured capture of the engine’s live registries and content collections.


What it can include

Depending on selected EngineStateParts, it can save/load:

  • asset files
  • tilesheets
  • animation cycles
  • scenes
  • sprites
  • audio resources

Important behavior

LoadFromFile clears current state first.

MergeFromFile does not clear the current state.

That distinction matters:

  • use load for full restore
  • use merge for patching or layering in content

Compression

State can optionally be written through GZip, which is useful when snapshots get large.


Design note

Most stateful engine systems are registry-backed, so EngineState works more like a snapshot facade over live engine collections than a totally isolated save object.


Where to read next

  • Gondwana/EngineState.cs
  • Gondwana/EngineStateParts.cs

Clone this wiki locally