Jump to content
  • Advertisement
Sign in to follow this  
fjholmstrom

Synchronizing actions to interpolated movement

This topic is 2499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've implemented pretty much the techniques described by valve here: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking It all works on both the server and client(s). With one little issue, or rather, a concern/question:

When I interpolate the movement of an entity between two points I already know, this causes a blanked 100ms rendering lag on the client (I receive state updates at 20Hz) of remote entities. This is fine, but when a remote entity does some action (say shooting or jumping), which needs to be synchronized to movement - do I not also need to delay these events by the same amount when I receive them from the server, so everything lines up nicely?

Share this post


Link to post
Share on other sites
Advertisement
Yes, you need to display object position and object actions at the same (consistent) time stamp. If they are somehow sent or simulated separately, then you'll get weird-looking artifacts unless you re-align them.

In this model, typically, you'll enter everything a remote entity does into a single receive queue on the viewing client, time-stamped, and play it back in order with some fixed delay based on your RTT to the server.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!