Netcode: Input Buffering

December 5, 2025

Netcode Articles

Overview - TL;DR

In the case of FPS games, we typically want as little latency as possible. When we get input from a client, we want the server to run it as soon as possible. However, we are dealing with the network here. Packets won't be evenly spaced - we might get 1, then 0, then 2 over the span of three ticks (jitter). They might arrive out of order, some might get dropped all together, you get the idea - it's unpredictable.

That is why we want to keep a buffer of inputs from the client. We want this to be as small as possible - ideally 1-2 ticks - in order to minimize latency, while still alleviating the effects of jitter, packet loss and out-of-order packets. If we notice the client's connection quality dropping, we can buffer more inputs to smooth things out until the quality goes back up.

There are techniques that other games/genres also use to reduce latency - things like rollback netcode, popular with fighter games. We could also use some of these ourselves... Read on.

Intro

Hey!


alt text here - an image of (blank)
Text description here. Can be multiple lines too!

More text!

A link to something interesting...

Scroll up to article links