Jump to content
  • Advertisement
Sign in to follow this  
AndyEsser

Network Interpolation

This topic is 3995 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

Hey guys, I've got my OpenGL game pretty much doing what I want it to do for the time being. I've decided to step back from the graphics for a bit and concentrate on some of the network components (this being a network game). Well, all seems well, I have an object on the screen of my client, and the object is rotated, by receiving a burst of data from the server every 250ms. The two bits of information that the server sends is the current rotation, and the rotation per second (speed). Using this the client sets the objects position, and for the remaining 250ms interpolates the position by calculating the amount moved each frame by doing (rotation per second/framerate). All very simple, and it works...to a point. Obviously, the positional data on the server is going to be received client later than it is generated (due to the fact that data can't travel instantaneously). Now this is fine, the interpolation takes care of the smooth movement. Until the update, where the object shoots forward to the point calculated by the server. But this is flawed, since this data is already old. The result is a smooth rotation, with jittery bits every 250ms. Any suggestions on how I can improve my interpolation alogrithm (I know it's very simple at the moment). Any help would be much appreciated

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!