Hey folks,
In our network environment, Client A (Alpha Wolf) predicts it’s own movement for the time it takes him to send his input to the server, and the server to send the results back.
Therefore, at an example-ping of 50ms, the client lives visually 100ms in the future.
Now we assume, he fires his weapon at his opponent “Client B” (B = Bad Guy). Where is this opponent displayed on the client A? Since it takes the server 50ms to send the position of Client B to Client A, Client B is displayed at the location where it was 50ms ago on the server.
Now assuming Alpha Wolf shoots at Bad Guy, directly aiming at him. His shoot will again take 50ms until it is processed by the server, making the bullet on the server spawn “50ms of movement in the past”, relative to Alpha Wolf’s view (since we actually live 100ms in the future, but the bullet will be already processed by the server in 50ms). Also, Bad guy will have continued to move on the server for 50 more milliseconds.
So, let’s add that up. Okay, that is really easier to imagine with a graphic, so I made one.
The whole graphic is from the perspective of Alpha Wolf, also the Millisecond-Axis is just for the client’s time, representing position.
Green Dot: The position where AlphaWolf (Client A) sees players locally at that moment
**Red Dot: **The position where the players actually are at that moment on the server
The Blue Lines: The movement past between the two timestamps. For the pew pew, the translation from local shooting location to server shooting location.
The numbers (1 and 2) represent the timesteps, each dots with a 1 are from one snapshot, the ones with a 2 from the next snapshot, which are 50ms apart.
As you can see, we have multiple issues here:
1.) The Bullet on the server fires from a different position than on the client, eventually having as a concequence, that objects block the way of the bullet, even though on the client, it looked like the path is clear.
2.) Even though that the Alpha Wolf aimed directly at the Bad Guy, the bullet will miss him by 150ms worth of movement.
My question is now, what are your suggestions to compensate this? Are there any “standarts” or common techniques for this issue?
These differences between Local Simulation and Server might not be very noticeable in some FPS environments, but as travling speed increases, these issues get more and more noticeable.
I am thankful for any help and discussion