Jump to content

Network pref settings


Duion

Recommended Posts

I made a menu where I can change the network pref settings like those: https://github.com/GarageGames/Torque3D/blob/development/Engine/source/sim/netConnection.cpp#L215-L218


Here is a thread discussing setting those values to speed up mission load times.

http://www.garagegames.com/community/resources/view/9131/1#comment-44726


Is this still up to date or is it safe to use values above those to speed up mission load times, since internet speed has increased?? I'm considering giving it more power at least from the server side, since the server has very high bandwidth.

Link to comment
Share on other sites

Also I wanted some thoughts on if a slider is okay for people adjusting these values in the options menu or if fixed drop down menus with presets or something would be better, to keep people from choosing unsafe values with the sliders, since they don't know what to chose.

Link to comment
Share on other sites

Here's my general rule when working with those variables:


$Pref::Net::PacketSize

Units are in Bytes, for per maximum packet payload size. Not MTU as it doesn't take into account for IP and UDP headers size.

Should be fine up to 1200 for today's commonly used internet services: ADSL, Cable, Fiber, Satellite, and Cellular connectivity.

However over 200 or 240 makes the game unusable for Dial-up 28.8K/56.6K modem users. While I do recommend at least 400 due to various classes in T3D that do rather large packUpdates


$Pref::Net::PacketRateToClient

Units are in how many times per second to send update packets to each client. Can't realistically be above 32 (31.25 updates/sec).

Ideally this shouldn't be set above 10 unless on a very low latency connection and have plenty of bandwidth, such as LAN or just a local/single player game, to send at worst case ($Pref::Net::PacketRateToClient * $Pref::Net::PacketSize * $Pref::Server::MaxPlayers * AverageGhostedObjectsCount) bytes per second.

However for racing and other fast paced games ten times per second might not be fast enough update rate.


$Pref::Net::PacketRateToServer

Units are in how many times per second to send control object move update packets to server.

This directly controls how often a client sends it's player controls state to the server and more often it sends it the less likely the server gets out of sync with the client player actions.

For any live action games this should never be below $Pref::Net::PacketRateToClient value and realistically can't be above 32 (really 31.25/sec) due to network updates also being driven by the same 32ms tick timing the rest of the game is driven by.



Anyway:

As for what to do to provide the user with the ability to configure those settings you can use sliders for each variable and a dropdown to provide configuration presets for whatever internet connection the user has. Tribes 2 did it a similar way:

T2SetupNet.png.14b4d62e46fb8263b413d3207765fd0c.png

Tribes 2 network settings

Link to comment
Share on other sites

Do you have numbers for those presets or how to calculate them?

There are some in the thread linked, but those are just modem, ISDN, DSL, LAN, today 95% of people will have just DSL with a different speed and Dial-up modems can be excluded, I think nobody uses that anymore.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...