I've been thinking of a similar solution for game states. It would generally be clean and safe. The only problem I've been studying is upgrading previous game states, because you don't want want to throw out previous ones. I've been thinking of writing functions to upgrade one version of the game state to the next. When you load a game state, you find its identity according to the "id" parameter, and upgrade it accordingly if necessary.
- James
On Tue, Dec 1, 2009 at 1:00 PM, Alex Queiroz asandroq@gmail.com wrote:
Hallo,
I am investigating the use of object->u8vector for serialisation of game state. It seems pretty straightforward, but I am concerned with future updates. I suppose that if I alter the structure in future versions I must change the 'id' field as well, so the old serialised structures won't be recognised as of the same type? Are there other gotchas I should be aware of?
Cheers,
-alex @asandroq http://www.ventonegro.org/ _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list