Zay-es network update time

It’s… complicated. I may have described it before. At some point I’m going to attempt to make an open source project out of some of the networking but time keeps getting away from me and it may turn out that the compression I use is Mythruna case-specific. Or rather, it may turn out to be difficult to have different zone sizes than what I’ve picked.

But beyond the compression stuff, on the server I collect position (including rotation) updates for moving objects every frame. Every 200 ms or so, I send a batch of these to the clients that are interested in them (based on zone). The client keeps a history buffer per object of the changes received… the buffer depth is based on some guess at server latency. As per those Valve articles, the rendering is actually done slightly back in time (100 ms I think) and so interpolates between known history.

The history buffer of positions is a client-only entity component. So there is a system that updates the position of the Spatials based on interpolating history in these buffers.

With just that, you may get sliding artifacts if packets are missed… and it’s a good idea to keep your UDP messages small. My own scheme includes redundancy but it’s part of the more complicated compression scheme.

The devil is in the details. Networking is very difficult.

1 Like