im searching for a way to solve the following problem:
I have to store the state of an object wich can have N=ComponentCount components each with his id, in a binary file with the following format (It could change):
[ComponentCount, componentId1, data..., componentId2, data..., ....]
For example (without the colons):
[0010,0000,...,0001,...] obj1
[0001,0100,...] obj2
So then i read the file and create the objects based on his components and data.
The big problemen here is that i can’t figure a way to support versioning, for example:
In v1.0.0 component id 0001 represent the red color, but in v2.0.0 red color was depreceated and now component id 0001 is blue color.
In that context, how a v2.0.0 program can update the v1.0.0 files to understand them correctly?