Repository navigation
Conversation
This decreases effective latency significantly by making clients and servers sending and receiving updates sooner. This increases network traffic by a factor of 3, but it should be manageable on today's networks. The average game-induced latency (on top of network lag) should now be 8 ms instead of 40 ms. See https://extra-a.github.io/#bnet for more information.
09d59cd to
56a47b6
Compare
|
Needs further testing and discussion. |
q009
left a comment
There was a problem hiding this comment.
The idea appears worth exploring to me. However, I think it'd be worth to put those behind variables, so the users can tune those. So, worst case scenario, the gist of the change may remain, only the final value of the variable would see further tweaks.
|
We revisited this and tried reworking it along the lines of q009's review: the update interval became a server variable (default 40 ms, so nothing changed unless an admin set it), and the timings tuned for 40 ms followed it. We've decided not to go ahead for now, but here are our findings for anyone picking this up later. Measured bandwidth (private local server, two clients plus bots, steady state over 10 seconds):
The increase is less than 4× because much of the traffic is events rather than positions, but it grows with player count. Demos record every world state, so they would grow too. Code tuned for the 40 ms rate:
Client send timing. Compatibility. Old clients silently ignore unknown server variables, so a server variable would be safe to add; they'd keep sending at 40 ms. Not tested: real internet conditions (jitter, packet loss, distance), full servers, and low-end machines. Any future attempt would need a public test server before changing defaults. Leaving this open for further discussion. |
This needs playtesting before it can be merged. While this should be fine on paper, it's possible that this is too much for less-than-ideal connections (4G, distant servers, …). I can host a 24/7 server with this pull request if this is desired 🙂
This decreases effective latency significantly by making clients and servers sending and receiving updates sooner. This increases network traffic by a factor of 3, but it should be manageable on today's networks.
The average game-induced latency (on top of network lag) should now be 14 ms (10 ms server + 0-8 ms client) instead of 60 ms (40 ms server + 0-40 ms client).
See https://extra-a.github.io/#bnet for more information.