What are latency and ping?
Latency is the delay; ping is how you measure it. Here are the numbers that feel instant, the causes you can and cannot fix, and the tricks games use to hide lag.

Key takeaways
- Latency is the time data takes to travel; ping is the round trip to a server and back, in milliseconds.
- Rough feel: under 50 ms feels instant, 50 to 100 is fine for most games, above 150 action games feel late.
- Distance, mobile networks and Wi-Fi add delay you cannot code away, so games hide it with prediction and smoothing.
Network latency is the delay between something being sent and it arriving, and ping is the common measure of it: the round-trip time in milliseconds for a small message to reach a server and come back. When players say a game "lags", they usually mean high or unstable latency.
Shout across a canyon and wait for the echo. The wait is the ping. Make the canyon wider (a server farther away) or fill it with wind (a busy Wi-Fi network) and the echo takes longer, however fast you shout.
What the numbers feel like
These are rough guides, not hard lines, and they depend on the genre:
- Under 50 ms: feels instant, even in fast action games.
- 50 to 100 ms: fine for nearly everything with decent netcode.
- 100 to 150 ms: noticeable in shooters and fighting games; fine for co-op and casual play.
- Above 150 to 200 ms: action feels late; turn-based and party games still work well.
Jitter, the variation in ping, is often worse than high ping. A steady 90 ms can be smoothed; a connection bouncing between 40 and 300 makes characters stutter and teleport. Packet loss, messages that never arrive, causes the classic rubber-banding.
Where latency comes from
- 01Distance. Signals in fiber travel at roughly two thirds of the speed of light, which adds up: a round trip across an ocean commonly lands somewhere around 70 to 150 ms before anything else is counted.
- 02The last mile. Mobile data and crowded Wi-Fi add delay and jitter; wired connections add the least.
- 03The server. A busy server that processes inputs late adds to every round trip, which is why tick rate and server load matter.
- 04Your own code. Waiting for a full server reply before showing a button press makes every tap feel slow, even on a fast connection.
How games and apps hide it
- Client prediction: move your own character immediately and correct quietly if the server disagrees.
- Interpolation: show other players slightly in the past, smoothly sliding between known positions.
- Optimistic UI: in apps, show the like or the sent message at once and roll back only on failure (realtime features explained).
- Design for it: turn-based play, timers with a grace window, and generous hitboxes make 150 ms invisible.
Latency when building with Startbase
Startbase games can sync over realtime channels (lobbies, turns, live boards) or use a dedicated room server per match for action games. Picking the right one for your genre does more for perceived lag than any tuning: a word game over realtime channels shrugs off 200 ms; a brawler needs a room server and prediction. How to build a multiplayer game walks through the choice, and multiplayer game ideas leans toward designs that tolerate delay.
Show each player's ping in the corner of the lobby and in-game, colored green under 80 ms, yellow to 150 and red above. Move the local player instantly with client prediction, interpolate other players 100 ms behind, and give attacks a 100 ms grace window so hits feel fair on slower connections.
Common confusions
- Ping vs bandwidth. Bandwidth is how much data per second; latency is how long each piece takes. A fast download plan can still have high ping.
- Lag vs low FPS. Choppy drawing is a frame rate problem on your device; lag is network delay. They feel similar and need different fixes.
- Input delay. Some lag lives on the device: screen processing and slow input handling.
Frequently asked questions
What is a good ping for online games?
As a rough guide, under 50 ms is excellent, under 100 ms is good for most games, and fast shooters start to feel late above about 150 ms.
Can code reduce ping?
Code cannot shorten the travel time, but servers closer to players, smaller messages and fast server processing help. Prediction and interpolation hide what remains.
What is the difference between latency and ping?
Latency is the delay itself, one way or round trip. Ping is the usual measurement: a round-trip time in milliseconds to a specific server.

