I would like to have a first hand explanation of how dirPrediction works.
This should help to debug the jumping/jerky ship turning which I often encounter.
Who implemented dirPrediction?
Re: Who implemented dirPrediction?
It was a player called Marvin, I think his name is mentioned in the XPilot NG AUTHORS file, his sourceforge user name is marvn.
Re: Who implemented dirPrediction?
Ok, thanks. Not sure if I can contact him though. I would also accept second hand explanations
from anyone who understands how dirPrediction works. Still haven't looked into the relevant code
closely.
from anyone who understands how dirPrediction works. Still haven't looked into the relevant code
closely.
Re: Who implemented dirPrediction?
I believe the idea with dirPrediction is that instead of waiting for the server's update of your new direction, you apply the new direction based on mouse movements immediately. This way, visually, the turning lag is eliminated.
Re: Who implemented dirPrediction?
Another important detail added in NG was the switch from relative mouse moves each packet to total moves IIRC. This, basically, eliminated the worst parts of network loss: losing bits of turns so you end up facing in an unexpected direction.
Re: Who implemented dirPrediction?
Also, bp client seems to dirpredict the hud function 'direction pointer', while NG does not. So on NG you see the3 direction pointer lagging behind ship turns, on BP you do not.
Re: Who implemented dirPrediction?
Yes, kps removed the round-trip-time from the direction pointer (in 2007 IIRC). Throat was interested to put this feature into the official ng client, but I think this was not done yet.
The main annoyance I have/had with dirprediction, is that sometimes the ship direction jumps back and force while I turn the ship. AFAIU, this is not related to loss, but most likely to lag. And my theory is that it is probably worse with variable lag (I think some call this jitter). I rule out loss, because I noticed the bad behaviour also while the loss metter didn't report any loss and also ping did not lose packets. I have also noticed the problem on a local server, while the system was _very_ busy, so that lag/client lag varied between 0 and over 100 ms or so.
When disabling dirprediction, the jerky ship movement vanished, but then I was not happy either, because it lagged behind my moves.
It is less of a problem now, than it was while on 56k. While I have relatively high lag to Rotunda's server, it seems to be quite stable:
rtt min/avg/max/mdev = 95.873/97.023/106.705/1.054 ms
But also on this connection/server, I sometimes feel a little "shiver" in the steering, more on the fxi server than on ng, if my prejudism doesn't deceive me here.
I'll post an illustrating recording some other day here.
The main annoyance I have/had with dirprediction, is that sometimes the ship direction jumps back and force while I turn the ship. AFAIU, this is not related to loss, but most likely to lag. And my theory is that it is probably worse with variable lag (I think some call this jitter). I rule out loss, because I noticed the bad behaviour also while the loss metter didn't report any loss and also ping did not lose packets. I have also noticed the problem on a local server, while the system was _very_ busy, so that lag/client lag varied between 0 and over 100 ms or so.
When disabling dirprediction, the jerky ship movement vanished, but then I was not happy either, because it lagged behind my moves.
It is less of a problem now, than it was while on 56k. While I have relatively high lag to Rotunda's server, it seems to be quite stable:
rtt min/avg/max/mdev = 95.873/97.023/106.705/1.054 ms
But also on this connection/server, I sometimes feel a little "shiver" in the steering, more on the fxi server than on ng, if my prejudism doesn't deceive me here.
I'll post an illustrating recording some other day here.