From the boost.serialization documentation: Here, we use the term "serialization" to mean the reversible deconstruction of an arbitrary set of C++ data structures to a sequence of bytes. Such a system can be used to reconstitute an equivalent structure in another program context. Depending on the context, this might used implement object persistence, remote parameter passing or other facility. In this system we use the term "archive" to refer to a specific rendering of this stream of bytes. This could be a file of binary data, text data, XML, or some other created by the user of this library.
In other words, serialization is any process that transforms objects in memory into some kind of bytestream, and deserialization does the reverse, taking a bytestream and transforming it back into objects in memory.
Serialization is a built-in feature of many languages and environments - for example Java and Python. In lower-level languages like C and C++, one must use (or write) serialization libraries, as the mechanism provided by the language is usually not good enough - it cannot follow or serialize pointers and references, and is subject to endianness issues, for example.
Wikipedia has a decent article on serialization.
Serialization is used extensively in games (and all software) for many purposes:
- Loading the list of all spells in the game from resource files.
- Saving and loading the game.
- Recording the state of things (e.g. player positions and inventories) to a SQL or object database.
- Invoking remote function calls over a network or other IPC link.