I'm trying to implement Quake-style delta encoding that works as follows:
1) Each client reports to the host the last tick tlast that it has received from the host.
2) Host generates a snapshot for simulation tick tcurrent and places it in a buffer.
3) For each client, the host compares the snapshot generated at tcurrent to the one generated at tlast and sends that client only the changed values.
4) Client receives the delta snapshot and recreates the full snapshot by filling in the gaps from the one it received at tlast.
Now, this algorithm seems to assume that the host is always sending the client an update on every object in the world, even if that object is irrelevant to that client. What I'm wondering is, what if I have more objects than I can reasonably encode in a single packet? I can send snapshots to clients that only contain updates on some objects (determined by priority, area of interest, etc.), but then I run into a problem. If I'm sending sparse snapshots, when a client tells me it's received data up to tlast, that no longer guarantees that every object has updated to tlast on the client's side.
The naive way I can think of solving this is to keep track individually for every object when it was last updated by the client. This seems to require keeping a jitter buffer for each individual object, though, which adds a lot of complexity. It also requires the client->host packet to contain a long list of every object and its last received tick. Is there a smarter way to handle this?
Thanks!