Skip to main content

Long read: The beauty and drama of video games and their clouds

"It's a little bit hard to work out without knowing the altitude of that dragon..."

If you click on a link and make a purchase we may receive a small commission. Read our editorial policy.

Console Gaming: The Lag Factor

Getting to grips with in-game latency, with help from Infinity Ward and friends.

The game is unresponsive. It's laggy. The joypad acts in a merely advisory manner. The control is rubbish. Game reviewers and players alike can be quick to put the boot into any given release - and rightly so, if it deserves it - but at the very least there should be a way of quantifying what has come to be known as controller latency. Human perception is something of an imprecise instrument, and similar to the wayward estimations of frame-rate that sometimes creep into reviews, a more scientific approach needs to be taken to get to the heart of the issue.

If cold, hard figures can be attached to specific gameplay experiences, comparisons can be made and deeper understandings can be reached. If a proven methodology can be put into place, games reviewers can better inform their readers, but more importantly developers can benefit in helping to eliminate unwanted lag from their code. The end result? Players get better, smoother, more responsive games.

"Our mantra of '60FPS 60FPS 60FPS!' would all be for nothing if we had horrible input lag," says Infinity Ward's Drew McCoy. "It is extremely helpful being able to see the physical, measurable, result of what is going on in our game - especially if things change or if someone in the office complains that things 'don’t feel right'. If anyone cares about the end user experience of their game, they should be heavily invested in their input latency."

Criterion senior engineer Alex Fry concurred in our expansive Burnout tech interview. "We try to get the latency down to the lowest possible, because it's just a better experience. It's one of the reasons Burnout runs at 60FPS."

In basic terms, controller latency is very easy to define. It's the time, usually measured in frames or milliseconds, between pressing the button on your controller and the appropriate action kicking in on-screen during gameplay. The longer the delay, the less responsive the controls, and the more unsatisfying the game can feel.

Methodology for measuring gameplay lag is remarkably straightforward and was first put forward by Neversoft co-founder Mick West in this Gamasutra feature, which combined the explanation of his techniques with measurements for a number of the most popular video games. Getting a very close reading really is very simple: stick a camera capable of recording at 60FPS in front of a monitor and record the gameplay while getting the controller in the same shot. West used a Canon digicam to do the deed, while I went for a Kodak Zi6 for its cheapness and 720p60 HD capabilities. Once you've recorded your clips, simply count the frames between the button press and the resulting action on-screen. As each frame remains on-screen for 16.67ms, simply multiply that by the number of frames and - boom - that's your latency.

Of course there are complications to the basic theory. LCD displays have lag of their own. Processing and scaling can take anything up to five frames depending on how aged and decrepit your flatscreen is. West's solution was ingenious: get a baseline measurement using a CRT screen (no latency there) and use the same measurement to factor out the lag of your flatscreen. With that in mind, I was able to see that my old, but still brilliant, Dell 2405FPW lags to the tune of three frames (50ms!) running at 720p, and two frames at 1080p (not surprising really as 1080p is far closer to the screen's native 1920x1200 resolution). Nice screen, pretty awful latency.

As Neversoft itself is responsible for most of the latest Guitar Hero games, where latency is hugely important, it is perhaps not surprising that Mick West took such an interest in this subject, and his conclusions are intriguing.

  • The lowest latencies a video game can have is 50ms (three frames) - the PS3 XMB runs at this rate, but few games reach it.
  • Most 60FPS games have a 66.67ms latency - Ridge Racer 7, for example.
  • 30FPS games have a minimum potential lag of 100ms, but many exceed this.
  • Game developers should test their own games using the camera technique in order to weed out bugs - West says that Heavenly Sword's response slows down to 300ms just by turning the character, and reckons it's a technical issue that should have been resolved before going gold with the game.
  • Citing GTAIV as an example, West suggests that a 166ms response is where gamers notice controller lag, which could also explain the Killzone 2 furore too.
  • Game reviewers should accurately measure latency for their reviews where controller lag is an issue, in the hope that sloppy game response times come under far more scrutiny.

Taking West at his word on that last point, I decided to give it a go and while initial testing was successful, I soon ran into a pretty big problem, as EG comment writers predicted I would. While the methodology is absolutely sound, the issue in frame-counting is all down to where the "zero frame" is: that is, the point at which the joypad button is fully depressed, and where you need to start counting from. I found the only way to verify results was to continuously test them again and again until a common result becomes apparent. Here are my initial efforts, using Killzone 2.

The video counts the frames for you, but all results need the three-frame lag of the display subtracted. In this case, Killzone 2 appears to have a 12-frame lag from button press to action on-screen shown here firing the gun. But judging the zero-frame is difficult so the measurement is only 'ballpark'...

Based on this video, we see that the lag in the fully patched Killzone 2 is 12 frames. Factor out the three frames of lag in the display itself and we're left with a 150ms "ping" between gamer and on-screen action. Now, many people have complained about the unresponsive nature of the controls in Guerrilla Games' epic to the point where the game was patched (this is captured from the latest code by the way), though based on my experiences I believe the analogue "dead zone" on the sticks was the main focus of the tweaks.

But the hassle in just getting one measurement I was reasonably happy with (but not 100 per cent confident in) was enough to give me pause. On a feature where accuracy really had to be second to none, I didn't feel I could proceed without a rethink.

Thankfully better minds than mine had done the thinking for me. Infinity Ward - creators of the Call of Duty franchise - loved Mick West's feature, and had used his techniques for eliminating unnecessary lag from their games. They too sought to improve the methodology, removing the zero-frame issue from the equation and making the whole exercise somewhat easier into the bargain.