Propagating new physics objects from one client to another

I posted this on the java game networking forum too (http://www.captiveimagination.com/forum/index.php/topic,77.0.html), not sure how live that is though, so I posted here as well.



What's the best way of creating new physics objects on one client and making sure they propagate to all other clients? for example, let's say my players have guns and that the bullets they fire are represented by DynamicPhysicsObjects.  If a player shoots, I want bullets to appear on all clients, and get kept in sync via the server.



It doesn't look like I can create a new DPO on the client that does the shooting, call PhysicsNetworkingClient.register() on it and trust to the API to sort everything out.  Can anyone shed a bit of light on this?



thanks

I don't know a thing about the JGN (sorry df) but it seems like you'd want to create those types of objects on the server, not on a particular client.  Maybe the client that is shooting would message the server that he is shooting and the server would do some checks (do you have ammo left, are you holding a gun, etc) and then create the bullet.

I responded on the JGN forum, but you essentially have to create them in both places since the premise of PhysicsNetworking is simply synchronization of physics objects between multiple physics worlds.  Your client has its own physics world and so does the server.  The client or server registers an object that it has control over so it authoritatively sends messages back to the other to let it know of changes (however, the server does have veto power).



darkfrog