Binary Serialization of World and Bodies.

Topics: Developer Forum
Jun 21, 2014 at 6:53 AM
Hi, I'm putting together a game and I find that after ~500 bodies are added to the world, the built-in XML serialization takes quite some time (about 15 seconds). I was wondering if there was support for binary serialization/deserialization that someone had added (ideally with the System.Runtime.Serialization stuff) that I couldn't find.

If that's not the case, I'll add it myself and share the source, but I just wanted to make sure I wasn't wasting time by jumping in :)

Thanks in advance.
Jul 15, 2014 at 11:48 AM
Having waited quite some time, and found nothing, I caved and went through Farseer, adding [Serializable] tags over every struct and class. The only thing that needed an [OnDeserialized] function was World for the stopwatch. The game is loading many, many times faster, you'll be happy to hear--now almost instant compared to taking quite some time.

I don't know how to distribute the code, so if you want it, reply? I've never used codeplex for anything before.