I am currently working on saving and loading objects, and right now I am loading and unloading using JsonFX. This works well except I don't want the data to be in plain text and packed as efficiently as possible. I've read that I should be serializing the data, and this field is completely new to me.
I've come across protobuf-net which works well for primitive object serialization, however, there are a few things I haven't been able to get working with it, such as serializing Vector3s, for example.
Ideally, at the end of this, I'd like to be able to take a list of game objects, serialize their positions, rotations, and any custom script variables. These game objects will not all have the same scripts attached and I won't need to save all of the variables in each script. With that in mind, can anybody suggest a general idea of how to solve this? My target platform is iOS so I'd like to have as small of a build as possible (as in, no System.xml). I am using c# and have iOS Pro if that matters.
Thank you, Justin
asked Jun 29 '11 at 10:54 PM
Why can't you just convert your Vector3's or Quaternions into float arrays and use those for serialization? That's what I do anyway.. works for me.
answered Jun 30 '11 at 04:05 AM