Re: What happens if you try to put bgt object variables into dictionaries?
Try it. You'll find out exactly what happens.
I think the serializer would give you an empty string back if you put things in there that can't be directly serialized.
The easiest way to serialize collections of objects is to add a serialize method to your objects which takes a handle to the target dictionary and some kind of identifier (which could be simply the object's position in some actor array).
That way you can right stuff like:
void serialize(dictionary@ destination, int id)
{
destination.set("char"+id+"_health", health);
destination.set("char"+id+"_atk", attack);
//...
//...
}
The same needs to be done for deserialize. This avoids having to write string parsing functions.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector