I've read through Glenn Fiedler's awesome guide on Reliability over UDP and I'm currently working on my own implementation for fun and learning purposes.

One pretty cool piece of Glenn's guide is that it implements redundant acks as a bitset: when a packet is acking a message, it includes a bitset indicating which of the previous 32 sequence numbers were also acked by flipping that particular bit to 1.

However, one issue I'm running into is what to do when packets are dropped at the beginning of the bitset, e.g. the 32nd bit is not acked.

Let's say my message header is the following:

Ack: 42
Bitset: ack everything from 10 to 41, but _not_ SequenceNumber 9! 
// or even Bitset: nothing previously acked

In this scenario, I cannot begin processing SequenceNumber 43 and beyond from the remote client otherwise I would have data loss for acking SequenceNumber 9.

Do I just stall and not process any further SequenceNumbers until I receive SequenceNumber 9? This should ideally be rare, but I worry that stalling everything may not be the correct solution and there's another possible solution.

  • 1
    \$\begingroup\$ This likely depends on the particulars of your game. If you have some ability to guess what the packet likely would have contained, you could proceed with that guess, and only invalidate that guess if the packet disproves it when it eventually arrives. This might be the case for games where players give input only sporadically (so you could guess the packet contained no new input) or where player input is usually similar from one tick to the next (so you could guess the packet contained the same input as its last received predecessor). \$\endgroup\$
    – DMGregory
    Dec 28, 2021 at 21:58

1 Answer 1


At some point, you would have to process the next packet, so as DMGregory said, you might want to interpolate the value based on the previous state and the next information available. You should not stall because you might never receive information at the end.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .