Advertisement

Gameplay+network issue

Started by April 12, 2004 12:15 AM
-1 comments, last by n0ob 20 years, 10 months ago
My top-down action (driving) game has a fairly realistic physics. Across the network, however, I begin to see an issue with collision. As one vehicle collides with another, something happens, which is basically 'warping'. The incident vehicle collides with the other vehicle, and transfers its momentum. However, the other vehicle remains stationary for a fraction of a second too long, and then warps to complete the collision. What I believe is happening is that the other tank has sent a position/velocity message, and the message is being received and updated on the incident player's screen just after the collision, so that the new transferred velocity has been cancelled by the update. Then the collision occurs on the other player's screen, and THEN the new velocity and position are sent, which causes the warping. This does not happen all the time. About half the time the collision is perfect, and the other half is out of step and warping occurs. I am working on a solution (unless I just did something wrong in code). I am thinking that I need to run the simulation a few milliseconds ahead of time on each client.. something like that.. to account for latency. OR else I will have to have the server handle the collisions somehow, and dictate to the clients what the reflection velocities will be. I appreciate any advice and help on this! Thanks very much! [edited by - n0ob on April 12, 2004 1:16:12 AM]

This topic is closed to new replies.

Advertisement