Post
Converting your game's living, breathing objects into dead data that can be written to disk and resurrected later.
Serialization is the process of converting in-memory game objects into a format that can be stored on disk, sent over a network, or otherwise persisted outside of runtime memory. Deserialization is the reverse -- reconstructing objects from stored data. Games serialize constantly: saving player progress, sending network packets, loading level data, storing configuration, and caching computed results. The format choices range from human-readable (JSON, YAML, XML) to binary (Protocol Buffers, FlatBuffers, custom formats). Binary formats are smaller and faster to parse but harder to debug. The tricky part is versioning -- when you update your game and change a data structure, old save files still need to load correctly. Schema evolution, migration code, and backward compatibility are constant concerns.
Example
Bethesda's Creation Engine serializes the entire game world state for Skyrim and Fallout saves, including the position and state of every object the player has interacted with. This is why save files grow larger over time -- every cheese wheel you knocked off a table, every body you left on the ground, all gets serialized into the save.
Why it matters
Serialization is the invisible plumbing that makes persistence possible in games. Without it, every game session would start from scratch. It also directly impacts load times, save file sizes, and network bandwidth -- making it a critical optimization target for games that handle large amounts of data.
Related concepts