Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Virtual Environment(grid of cubes) which has the same state on both users when the application starts.

Both users have haptic devices, whose position is depicted by a small sphere in the virtual worlds.

Now If I am correct an objects state is represented by 4 values in every iteration by a physics engine position, linear velocity, orientation, orientation velocity i.e. angular velocity

Now the the object state changes when the sphere representation of haptic device(controlled by user, can move in 3d space i.e 3 degrees of freedom) collides with them.

Both users calculate different VE state every 1ms (update rate 1kHz). This is because every users gets his haptic device's latest position, and other users Haptic device's old position as it takes few ms atleast over the network (finite delay for a UDP message).

Now how do I make one users VE copy the state of the other user, but at the same time keep its physics engine on?

I have already implemented a different version, where I simply turn off the physics engine on oner user and transmit the 4 values from above via UDP periodically and user simple prediction.

How can I make the states consistent as well as user physics engine on both users?

share|improve this question

closed as off-topic by Josh Petrie Dec 3 '13 at 5:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Programming questions that aren't specific to game development are off-topic here, but can be asked on Stack Overflow. A good rule of thumb is to ask yourself "would a professional game developer give me a better/different/more specific answer to this question than other programmers?"" – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.