The basics of performance
When playing a multiplayer game via the internet, there are four key performance elements that affect the quality of gamer experience:
- → Framerate
→ Image quality
→ Input to action latency
→ Lag or server latency
Framerate (also known as Frames Per Second, or FPS), image quality and input latency are major factors in both online and offline experience. However, these are all primarily impacted by the user’s hardware.
Here, we dive into server latency or ‘lag’, how it affects experience, what it is caused by, and how it can be measured and improved.
Understanding gaming lag
When playing an online multiplayer game, players often refer to something being ‘laggy’ when the following situations occur:
- → Player movement is not smooth, and jumps back (or sometimes forward): this is also referred to as ‘rubberbanding’;
→ There’s a noticeable delay in item interaction, i.e., between the user interacting with an object in the game, and an action occurring (e.g., opening a door);
→ A player appears to get shot, after they have already moved to a safe area, e.g., behind a wall.
Causes and effects of lag
Lag, at its simplest, is created by the time required for network packets to be sent from one machine to another – packet latency – both client-to-server and server-to-client. But to comprehensively grasp the causes, we need to better understand how today’s game design attempts to deal with packet latency.
A common current response is to create a ‘lockstep simulation’, typically implemented so only the server runs the simulation. The client sends its input events, and waits for the state from the server. This option can be adequate for turn-based games; but in the case of a First Person Shooter (FPS), the significant unresolved latency between client and server is entirely unsatisfactory.
To address this, both the server and client run the simulation, and rely on ‘state synchronisation’ to ensure all players see the same gameplay, with the server as the master, deciding if a particular client action was valid.
However, if a client experiences intermittent high packet latency or dropped packets, the server may not see an action from the client, the master state goes out-of-sync, and the client is snapped back to what the server sees as the correct state. (This, by the way, is a primary cause of rubberbanding, noted above.)
In this scenario, each player is also effectively playing their own game, and due to differing levels of packet latency, they are also playing at slightly different points in time.
For example, where players A and B both have high levels of packet latency – say 100ms – A sees B and shoots them, meanwhile B sees the danger and hides behind a nearby wall. When A shoots B, this is a legitimate shot: but by the time this action reaches the server, is validated and sent to B, B is already hidden behind the wall. The result? A gets the kill, but from B’s point of view they have been killed while hiding behind a wall.
Lag is caused by packet latency and packet loss, and while packet loss is self-explanatory, packet latency is more complex. A major component is the time for a packet to get to and from the server – Round Trip Time or RTT – where smaller values are naturally preferable.
Nevertheless, networking is both complicated and non-deterministic. When a server sends a simulation state packet every 16ms, these packets will not arrive in 16ms intervals, but more likely in clumps and out of order, thus causing packet jitter. The client cannot process the packets as they arrive, instead buffering them: the number of packets it buffers depends on the amount of packet jitter (so this is often referred to as a jitter buffer). With a respectable mean RTT, but high jitter, we still have high total packet latency.
How we measure lag
To minimise latency, gaming traffic uses UDP (User Datagram Protocols), so does not benefit from TCP’s inbuilt mechanisms for measuring RTT, jitter and packet loss. To get accurate measurement, we need to view game logs, or game overlays if supported.
Many internet quality measurements use ping to measure RTT. Although this offers a coarse prediction of a gaming experience, it is far from accurate.
First, because ping uses ICMP packets, and ICMP will behave differently from UDP on a network infrastructure. Second, it is measured over a very short period of time (seconds or less): to get an accurate picture we must analyse data over a greater period of time. Finally, it does not take into account jitter, and the jitter buffers described above.
To meet these challenges, at GameBench we use our ProNet tools to extract the network metrics from games themselves, as well as ping, over an extended period of time. They deliver automated, cross-platform network testing and analysis of:
- → Real-world, end-to-end user latency;
→ Comparative network performance;
→ Quantitative measurement of user experience;
→ Game streaming performance.
Via our bespoke LABS offering, GameBench also provides an end-to-end range of services to evaluate, analyse, and deliver insights about device, application, network and platform performance.
The deep performance data produced is delivered in meticulously designed, intuitive and actionable reports. Our visualisation layer, based on Gamebench’s proprietary Visual Badge System, provides instantly applicable performance and benchmarking insights for engineering, QA and marketing.
Tips for improving lag at home
Lag is impacted both by users’ home networks and by their network operators. With bandwidth becoming a decreasing bottleneck, gamers will consider network latency more, and demand better performance from their networks. Indeed, some networks are already working hard to improve their gaming performance.
For now, here are a few tips for gamers to minimise lag:
- → If PC gaming, ensure no other application is using the network;
→ If unable to connect directly to the router with a cable, use a good quality WiFi 6 router;
→ A mesh WiFi 6 router is often better than using an ethernet powerline adapter.
When sharing the network with others, gamers should ideally use a router with a Quality of Service (QoS) function, which can identify and prioritise gaming packets.
Performance IQ by GameBench is a hassle-free, one-minute read that keeps you abreast of precisely what you need to know. Every two weeks, right to your inbox. Here’s a quick and easy sign up for your personal invite to the sharp end of great gamer experience.
The intelligence behind outstanding performance