The 'Lag' in Online Gaming: Latency Explained

Why did you miss that shot? It might be 'Tick Rate' or 'Input Lag'. Understanding the pipeline from your mouse click to the server.

The “Lag” in Online Gaming: Latency Explained

“I clicked! I swear I clicked!” Every gamer knows the pain. You shot first, but you died. This is Latency. It is the time delay between “Intent” and “Action.”

The Pipeline of Delay

Total System Latency is a stack of tiny delays:

  1. Input Lag: Mouse click -> PC CPU registers it. (1-5ms)
  2. Processing: Game engine calculates the shot. (5-16ms at 60fps).
  3. Network (Ping): Data travels to the server and back. (20-100ms).
  4. Display Lag: The monitor draws the new frame. (1-10ms).

Server Tick Rate

The server doesn’t run in real-time. It runs in “Ticks.”

  • CS:GO / Valorant: 64 or 128 Ticks per Second. The server updates the world every ~8ms.
  • Minecraft / Roblox: 20 Ticks per Second. Updates every 50ms. If you shoot between ticks, the server doesn’t know you shot until the next tick. Ideally, you are fighting the “Refresh Rate” of reality.

The Robot Control Loop

Robots have a Tick Rate too. We call it Loop Time. The code while (opModeIsActive) { ... } runs over and over.

  • Good Loop Time: 10ms (100Hz). The robot feels snappy.
  • Bad Loop Time: 50ms (20Hz). The robot feels sluggish. It overshoots targets because it didn’t check the sensors fast enough.

We optimize our code (remove System.out.print logs, optimize math) to drive that Loop Time down. In gaming, high FPS wins duels. In robotics, high Loop Frequency wins matches.

Explore FIRST® Robotics

FIRST® (For Inspiration and Recognition of Science and Technology) is a global robotics community preparing young people for the future. Discover the ultimate sport for the mind and see how you can get involved in STEM and robotics!

Learn More at firstinspires.org