Patch fixing discontinuous movement of other characters.

Thilo Schulz arny at ats.s.bawue.de
Sat Oct 14 10:32:23 EDT 2006


Hi,

In some leagues for EliteForce, players are required to set cl_maxpackets to 
the same value as their com_maxfps setting. The reason is that if different 
amounts of user commands arrive each server frame, the speed of players as 
visualized to the others becomes unsteady as well. I have checked it in plain 
(io)quake3, the same problem exists here, too.
The standard setting for cl_maxpackets is 30, while today's hardware can get 
framerates high above 100 fps. So if you're using a popular framerate like 
125, some packets will have more, some will have less usercommands, so for 
each server frame, a client can have differing amounts of usercommands.

Here is a demonstration video visualizing the results you will get with an 
unmodified server. These demos were made at a ping of around 50ms.

http://thilo.kickchat.com/videos/usercmd-test_original.avi

My patch adds a buffer where a limited amount of usercommands can be stored.
There is an algorithm in place which tries to keep the buffer status as low as 
possible while ensuring that the server has a nearly constant rate of *valid* 
usercommands. Only if necessary (i.g. com_maxfps < sv_fps) will it duplicate 
usercommands. It looks very promising, the movement runs smoothly no matter 
which client settings are active.
However - of course there is a downside. If this feature is enabled, it will 
add some latency to user commands. The less stable the incoming rate of 
usercommands, the more latency will be added as the buffer may hold more user 
commands to compensate for missing usercommands.
Here's a demo video for the patched version:

http://thilo.kickchat.com/videos/usercmd-test_patched.avi

The patch is not well tested yet, I'd like to have a chance to check on 
playing when you have a higher ping.
The rate of prediction errors is not much higher than without this stuff, as 
it will only add duplicate user commands as a last resort, which practically 
doesn't happen if the rate is stable and the algorithm has swung in.

To enable the feature, use sv_antiWarp 1 on the server. You can toggle the var 
to compare movement with/without this antiwarp feature.
Have fun!

-- 
Thilo Schulz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ioquake3-rev935_usercmdrate.diff
Type: text/x-diff
Size: 12690 bytes
Desc: not available
URL: <http://icculus.org/pipermail/quake3/attachments/20061014/ab726db1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://icculus.org/pipermail/quake3/attachments/20061014/ab726db1/attachment.pgp>


More information about the quake3 mailing list