I came up with using a Varchar of 10000 bytes for now on the server, and the choices the user makes are put into a hash table. When it's times to serialize the data I convert the hash table to xml and then the resultant xml to string for upload to the varchar for each player.
It reverses and when I get it back I convert to xml, iterate through the child elements and rebuild the hashtable which implemented all the users choices again when they log in later.
Here's a snippet of the xml generated [ note for NDA reasons I changed the values ]. It's extensible too. The item child can have anything inside it, such a sound effect, or hit points if I choose to add more later, without the need to rebuild the database. ( EDIT: Doesn't work so well at the moment as the http POST it trying to interpret my XML - Need a way to cloak it )
No comments:
Post a Comment