Game dev
Saved & recent

Serialization

Related terms: save system, save file, JSON, binary, versioning

Turning live objects in memory into bytes that can be stored or sent, and turning them back. Save games, scene files, prefabs and network messages all depend on it.

Text formats such as JSON are readable but large. Binary formats are compact and fast. The format is the easy part. The hard parts are deciding what to save, restoring links with persistent identifiers, and migrating old saves after the game has changed.

Further reading
Godot: Saving games
live door state open true encode decode stored JSON {"open":true} 7B 22 6F 70 65 6E 22 3A 74 72 75 65 7D 13 bytes
The open state encodes to JSON and UTF-8 bytes. Reading those bytes back restores the state.

View in the full Game dev collection