Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

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 am looking for programming methods to counter network latency for say a racing game or a FPS. What I specifically mean is what would I need to do to the physics engine and what information should I transmit so that the physics engine does it's job when the network information is not available?

If anyone has any pointer to articles or sites that have this type of information. It would be greatly appreciated.


migration rejected from May 9 at 16:18

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as too broad by Josh Petrie May 9 at 16:18

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Here's a good place to start: Gaffer on Games, networking notes

This is the link everyone posts to every networking question, but IIRC (it's down for me right now) he doesn't actually write anything about synchronizing state or clientside-prediction. – BlueRaja - Danny Pflughoeft Jul 12 '11 at 17:12
The client methods are varied, most simply maintain a short queue of recent and known position updates and then use that pattern to extrapolate future positions either by building a spline or linearly. It's really not much more complicated than that. – Patrick Hughes Jul 12 '11 at 17:14
So then.. put that in your answer. – BlueRaja - Danny Pflughoeft Jul 12 '11 at 17:16
This buffered concept is covered in "needs to know about game networking" section of the Gaffer link, I merely summarized because the link was down for him momentarily. – Patrick Hughes Jul 12 '11 at 17:37
I agree with BlueRaja. If all you're going to do is post a link, then add it as a comment. It's not going to be very helpful to future users if the link ever breaks (site is down, files moved, etc.). – Richard Marskell - Drackir Jan 16 '12 at 18:44

More important then network latency, a lot of which is out of you hands, is accurate client side prediction. Especially for a FPS where lag can be a very frustrating handicap.

This is along what I was looking for. The concept seems simple. In a car game I would get data from the sever about position and use physics to predict where the car is going then tween to adjust the position when it is received. This could get a little tricky. – Leonardo Amigoni Jul 12 '11 at 22:00

Check out Mike Zyda's Networked Games course, has MP3 lectures if you like that.


I wrote a series of articles that you may find useful: I don't invent anything, but maybe you find the way I present it more understandable.


What we have learned in Numerics for example is the topic interpolation of polynomials. Using the theory about this topic you could provide some information about acceleration, velocity, location, ... of all entities to be computed with via differentiation or numerical integration and usage of ordinary differential equations (ODE) to predict the movement and happenings and render them smoothly although you might not have received all data yet.

Using ODEs you might want to look at the Euler method, the Heun method or the Runge-Kutta method. Interpolation itself is based on Lagrange polynomials and the Aitken-Neville scheme or the Newton method.


Not the answer you're looking for? Browse other questions tagged or ask your own question.