jhester / DistributedGA

A distributed Genetic Algorithm simulation.
http://josiahhester.com
5 stars 0 forks source link

(Un)Packer #7

Closed ghost closed 13 years ago

ghost commented 13 years ago

We need a packer/unpacker class (either 1 per class, or 1 that handles all classes). Packer should be able to pack into a string, unpack into a class, or unpack a string and update an existing class. I'm not sure the best way to do this, we need condor so downloading new modules isn't really a good idea (right?) we could use 'struct' but I think it has site limitations. Struct seems to be designed for single variables which might work for the players as they are just id, xpos, ypos, health (int,int,int,byte) right now.

We might need to just write our own function to pack into bytes and create a string...

jhester commented 13 years ago

That seems the best option to me, since we have to use python 2.4 (because of condor) we may need to have a lot of custom functions.