Serializable/Externalizable body?

Hello,
is possible set the body Serializable/Externalizable? it can be really useful for network game 🙂
I think the externalize is the solution, because body contains world, ControllerEdge, XForm, Sweep, Vec2, Shape, JointEdge, ContactEdge, and Object(userdata and idlock).
XForm, Vec2, shape and userdata is easy to be serializable (just a check for valid userdata, if serilizable then send it^^).
idlock and world has to be created on the receiver.
ControllerEdge, JointEdge, ContactEdge have to be recalculated on the reciver?
what about Sweep?
maybe i can only send xform and a "shapes container" and then recreate the body on the receiver? 😮

off topic: what you think is the best solution to solve the asynchronous body creation due to network lag?
Based on what I've don't, serializing the body objects themselves is not the way you would want to network a game. Plus, it wouldn't really work out well with the engine. See this thread for networking tips:

viewtopic.php?f=9&t=4009

lestofante wrote:
off topic: what you think is the best solution to solve the asynchronous body creation due to network lag?


That's solved with the message system I talk about in that thread, where you tell everyone in the network to create a body at the time, say T, where T is the time (in seconds, milliseconds, nanoseconds, whatever) from when the game officially started.
I was thinking to make the user draw it's "avatar", then simply send the shape to server and validate it. If the body is ok send him to all client (for pre-load the images), then the server can activate/deactivate a body on a client simply with a "infoposition packet" or "remove packet"

i've readed the post a week ago, i like the idea of synchronous creation and i'm going to implement it. also I was thinking about something similar but with rollback done periodically to synchronize [only the position, rotation and velocities], because the world can have 2000+ obj and it's impossible to send and receive them in one step, and use an interpolation between the estimated position and "official" servers position.

Original thread: https://box2d.org/forum/viewtopic.php?t=4364