I hope to gather data regarding ticcmd queue size during gameplay for informational purposes.
Is that your "ticcmd_queue logging test" server?
I'll repeat my (draft) proposal.
Just trying to make the player move slowly enough is not quite correct; Doom doesn't allow you to stop suddenly unless you crash into an object or a wall. So speed should be changing slowly as well.
Not knowing a few consecutive ticcmds doesn't introduce much uncertainty to player position. (It grows quickly with the number of ticcmds, though.)
The current behavior, however, somewhat helps client experiencing a short latency spike by suddenly stopping them and thus disrupting their enemies' aim. Creating artificial latency spikes is, however, useless for cheaters, because of the additional latency which can't disappear at cheater's will (the queue on the server).
Ticcmd queue is also, in effect, an anti-speedhack. This should be preserved also.
Thus, I propose the following:
- If the server stops receiving ticcmds form the player and exhausts the ticcmd queue, start to estimate possible player positions. As long as uncertainty doesn't exceed some threshold OR the player cannot be visible anyway, predict the player position and increment the player's
counter. (Client probably should be aware that player's position is server's speculation.) When it does, stop predicting.
- When the lost ticcmds arrive, immediately execute
counter commands, set
counter to zero, and put the rest in queue.
Notes:
If we're uncertain if player will cross a special line, stop predicting.
Problems:
- If the player firing command was lost, it might have been better for him to be "frozen" and hope the enemy will miss adn his own shot will hit.
In coop, ticcmd queue doesn't help much but ensures that monsters will kill you. It probably should be off in coop configs.