Multiplayer/loading/saving support

Not sure what you mean with static objects, could be anything really, could literally be a world, or objects which went static.

None the less, I would want something easy to use, something to transmit the entire world.

So I imagine a multiplayer game would work as follows:

1. First transfer the entire world state to other players when they join.

2. From that moment on proceed with little updates.

For part 1 the mention feature could/would be handy ! 😉:)
I think by 'static' he means anything that could be known just be loading the level/map file, which all clients would have available.
There is a lot of other information that doesn't need to be sent too - like the shape for a characters body, the shape for other common objects in the game like the enemies etc (presumably this does not change). Seems to me all you need to send is the existence of objects and their location, orientation and velocity. None of this requires any help from the physics library. The only occasion I can think of that you would need to actually send shape/fixture/body definition information is if you have deformable objects in the world, like if you can break things and the broken pieces are relevant to further gameplay.
The same goes for loading/saving of non-networked games too. When you save a level, isn't is sufficient to just save information like "the player is at position=x,y rotation=r velocity=v.x,v.y"? Do you really need to put in the save file what box2d polygon fixtures the player has and their density, friction, restitution etc?

Anyway, here's an interesting article on how Quake3 manages syncing of state across clients, I was reminded of it when reading this thread, you might find it interesting.
http://trac.bookofhook.com/bookofhook/t ... Networking
Too specific...

1. Box2d does not know what enemies are.

2. In principle external code has no access to class fields.

3. Bandwidth doesn't necessarily have to be a problem. My download speed is 2.6 megabyte per second, and my upload speed is 270 kilobyte per second.

Seeing the little ammount of fields that the classes have I am not to worried about the size or the bandwidth usage of it.

Even if an upload would take a few seconds then I think that's very acceptable.

So I would go for the general approach and implement something easy and lazy 🙂 which solves all your doubts in one go.
Skybuck wrote:
Box2d does not know what enemies are.

That's why the serialization shouldn't be made by Box2D.

Skybuck wrote:
My download speed is 2.6 megabyte per second, and my upload speed is 270 kilobyte per second.

If your bandwidth is that big I really think Erin Catto should code a serializer you will be the only one to use...

It seems you don't want to understand. I suggest you start coding it. Then maybe you'll see it nonesense.

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