Netcode Tweaks

[PCF]Adrian has been reading the boards and has noted the frustration over netcode. He has written the following on the official DreamCatcher forums:
———————————
We have made some tweaking possible in mp, eg. if you look at your config file in /Bin, you will find these lines:

Cfg.NetUpdateClass00 = {0.0222222,0.02,0.02,0.03,}
Cfg.NetUpdateClass01 = {0.0666667,0.2,0.2,0.2,}
Cfg.NetUpdateClass02 = {0.1,0.01,0.01,0.02,}
Cfg.NetUpdateClass03 = {0.01,0.01,0.01,0.01,}
Cfg.NetUpdateMaxPacketSize = 500
Cfg.NetUpdateSendPeriod = 10

But of course tweaking that is pain in the ass, so heres what you can do from the console (results are written to config when you exit the game):
==============================================
When youre connected and playing, bring on the console.

Console Commands:
==============================================
netstats

Gives lots of info of whats going in the network. Its a summary of the last 5 seconds.
==============================================
netstats overall

Gives lots of info of whats going in the network. Its a summary of
everything from the beginning of your connection.
==============================================
netstats help

Info about the command.
==============================================
maxpacketsize

Shows how big is the size of the packet that your game sends. Sometimes the game needs to send something undividable and bigger than this size – and it will do it – but generally the game tries to avoid such situation.
==============================================
maxpacketsize

Sets the maximum size of a packet.

Rumor has it that smaller packets have priority in overcrowded networks. On the other hand, they may get lost easier (because there more of them). Its a good command to play with and see whats happening with larger/smaller packets.
==============================================
maxpacketsize help

Shows info about the command.
==============================================
updateparams_myplayer

Shows current parameters for our player (eg. the camera)
==============================================
updateparams_myplayer help

Shows info about the command.
==============================================
updateparams_myplayer

First parameter is how often the server should send out new data of the player.

Second parameter says that server should not send the players new velocity info if its not different by from the last one sent

Third paremeter says that server should not send the players new angular velocity info if its not different by from the last one sent

Fourth parameter says that server should not send the players new position info if its not different by from the last one sent

Example:
updateparams_myplayer 0.5

In this example players new position will be send from server every 0.5 sec. Note that in this example we ignored last 3 parameters, as they are for hardcore experts only and dont change that much anyway I think.
==============================================
Similiar commands (like those for the player) are available for other things:

updateparams_players – other players and some objects
updateparams_physicsitems – physical items, eg. barrels
updateparams_projectiles – rockets, grenades, stakes, etc.

Generally the frequency of the update has direct input on the size of the data stream from server to client. If you want to decrease the size of this stream, increase the delays. If you want smoother gameplay, decrease the delays.

DO NOT set any delay to 0 – that will reset all other parameters (linVel,angVel, pos).
==============================================
Changed parameters are written to config.ini when you exit the game, so pelase remember what you had originally before tweaking, if you dont want to loose it (backing up config.ini is a good idea).
——————————

Let us know if you find good values to use that help at all. Thanks to Adrian for this and listening. Catch the full thread here: http://dreamcatcherinteractive.com/forums/showthread.php?s=&postid=82734#post82734

This entry was posted in Uncategorized by Warhog. Bookmark the permalink.

Leave a Reply