Page 1 of 1

Export format for scene description

Posted: Tue May 03, 2011 1:03 am
by pwagner
Hello.

Is there any scene description format which chipmunk is able to load/store? I would like to save the whole scene (bodies and shapes with all of their attributes) and resume the calculations at another time or let the user define a scene and load it into chipmunk to calculate the physics.
If nothing already exists maybe you have suggestions for a format?

Best regards

Re: Export format for scene description

Posted: Tue May 03, 2011 8:23 am
by slembcke
Not currently no. Serialization of an entire space is actually pretty tricky to do. It's on the todo list for Objective-Chipmunk, but it would pretty difficult to the point of being useless to use at the C API level.

Re: Export format for scene description

Posted: Wed May 04, 2011 7:36 am
by Beoran
You could probably export or import from scalable vector graphics format. That way you can edit the scene with a normal svg editor. You'll have to use some conventions for constraints, such as color, and some shapes you'll have to ignore. I think it's not that hard in Ruby as you get xml parsers for free.