==========
OVERVIEW
==========
When you play online, the game running on your machine is called the ‘client’, and the place where you connect to play is called the server.
When you connect to a server, there are two sets of data transfer taking place; server-to-client (downstream), and client-to-server (upstream).
Downstream data contains information about what you see happening, and upstream data contains information about your own movements and actions.
This document details the settings you can tweak your configuration to optimise your game for online play.
Glossary
——–
‘Ping’ – refers, in game terms, to the sum of all the delays from the time an event takes place on a server, to when the server recieves confirmation that the client has heard about it.*
*The components of ping are the network delays, and the delays inherent to the upstream and downstream update rates (the higher the rates, the lower the delays). Note also that the network component of ping increases as the use of remaining upstream and/or downstream bandwidth decreases, as you approach the limits of your connection speed. Painkiller netcode automatically removes much of the effect of ping to a reasonable limit (no need for pushlatency/timenudge settings). Despite this, a lower ping is always preferable.
‘Lag’ – refers to a percieved effect of delays taking place, commonly sluggish movement or game reactions.
‘Packet Loss’ – refers to upstream or downstream data packets being lost, to taking too long to reach their destination. Typical this is experienced as a sudden jerk in gameplay, or an event being missed.
‘Warp’ – refers to the sudden unpredictable movements of a player.
============
QUICKGUIDE
============
The key commands you should tweak to improve your connection, are;
setmaxfps – controls the amount of upstream data (update rate).
serverframerate – controls the amount of downstream data (update rate).
enemyinterpolation – smoothes player movements
Values given are suggested values only. You may find you need different settings for varying number of players on the server (i.e. Duel or Free For All games)
MODEM (33.6kbps or 56kbps)
————————–
setmaxfps 60, 30 or less*.
serverframerate 15 or less.
enemyinterpolation 1
*If the framerate becomes too low for you to play, it is recommended that you pick a reasonable framerate, and limit your upstream using the ‘clientbandwidth’ command. Try ‘clientbandwidth 2000’ and ‘setmaxfps 60’.
ISDN (64kbps or 128kbps)
————————
setmaxfps 60 or less.
serverframerate 20 or less.
enemyinterpolation 1
Low Bandwidth DSL/ADSL/CABLE (128/64, 256/128, etc)
—————————————————
setmaxfps 60 or less.
serverframerate 20 or less.
enemyinterpolation 1
Low Upstream DSL/ADSL/CABLE (*/64, */128)
—————————————–
setmaxfps 100 or less.
serverframerate 20 or less.
enemyinterpolation 1
High Bandwidth DSL/ADSL/CABLE (512/256, 1024/256 or higher)
———————————————————–
setmaxfps 100 or 125.
serverframerate 30 or less.
enemyinterpolation 1
LAN/T1/E1
———
setmaxfps 125 or more.
serverframerate 45 or more.
enemyinterpolation 1
==================
NETCODE COMMANDS
==================
Note: all commands may be entered from console, but require the prefix of a backslash, forwardslash, or dot.
setmaxfps 0-250
—————
This sets the client rendering rate, but it also influences how many client-to-server packets are sent every second. Sets the ‘Cfg.MaxFpsMP’ setting.
serverframerate 1-100
———————
Sets the number of server-to-client updates the client wishes to recieve from the server per second. Sets the ‘Cfg.NetcodeServerFramerate’ setting.
enemyinterpolation 1/0
———————-
Toggles smoothing of other players’ movement. Sets the ‘Cfg.NetcodeEnemyPredictionInterpolation’ setting.
netstats 1/0
————
Toggles rendering of on-screen network debug information.
clientbandwidth
—————
Sets the upstream client bandwidth limit. Sets the ‘Cfg.NetcodeClientMaxBytesPerSecond’ setting.
==================
NETCODE SETTINGS
==================
These settings are to be found in the file ‘config.ini’ in the ‘\Bin’ folder of your Painkiller install. NOTE: You should only ever edit this file while Painkiller is not running, or changes made will be lost.
Cfg.MaxFpsMP
————
This sets the number of client-to-server packets recieved each second. Also sets the client rendering rate. For a high rendering rate and lower upstream bandwidth use the ‘Cfg.NetcodeClientMaxBytesPerSecond’ setting. Default value is 0, but you should set this to somewhere between 15-125.
Cfg.NetcodeClientMaxBytesPerSecond
———————————-
This sets the upstream bandwidth limit, in bytes per second. Setting to -1 disables the upstream bandwidth limit. Default value is -1.
Cfg.NetcodeEnemyPredictionInterpolation
—————————————
This smoothes the movement of player models seen. Default value is 1.
Cfg.NetcodeLocalPlayerSynchroEveryNFrames
—————————————–
Sets the number server frames between which a server-to-client synchronisation takes place. This only affects your own player’s position. Between these updates, the client will use your movement input to predict your position. Setting this higher than 0 slightly reduces downstream packet size. Default value is 0.
Cfg.NetcodeMaxPlayerActionsPassed
———————————
This setting sets the number of client frames worth of movements which are buffered, and sent to the server in each client-to-server update. This is done so that in the event of single packet loss, player actions have a higher chance of reaching the server. The downside to this is upstream packet size is increased, which can lead to a higher ping. Default value is 1, suggested range is 1-3.
Cfg.NetcodeMinUpstreamFrameSize
——————————-
This setting selects the minimum size of client-to-server packets. If your upstream bandwidth is limited, you can use this setting, along with a fixed client framerate (via setmaxfps), to maintain a constant client-to-server data rate, and stablise the upstream component of your ping. Suggested values are 0-50. Note: this will usually incur an increase in your ping. Default value is 0.
Cfg.NetcodeServerFramerate
————————–
This sets the number of server-to-client packets recieved each second. Default values depend on your connection, but should be in the range 10-30.
Cfg.NetcodeStatsNumberToAverageFrom
———————————–
This setting allows you to control the amount to which the values observed in netstats on-screen network debug information. Default value is 1.
Cfg.NetcodeStatsUpdateDelay
—————————
This sets how frequently, the onscreen display for netstats is update, in milliseconds. The default value is 1000 (1 second).
=================
TROUBLESHOOTING
=================
1. My ping is very high (shows constant 255 on scoreboard, or doesn’t update)
—————————————————————————–
It is likely that your netcode settings are too high for the connection type you are playing on. Choose the settings for a lower connection type.
Check the location of the server, if it is in the same country as you.
Also check that you are not running anything else (such as downloads) which is using your connection.
2. When I enter a server, I cannot move, or if I do move, the player reacts after several seconds
————————————————————————————————-
This will occur when your ping is greater than 1 second (1000ms), but my ‘ping’ on the game scoreboard doesn’t update. (See 1)
3. My network symbol keeps appearing
————————————
The network symbol appears when no server-to-client data is being recieved. If it appears frequently, it is likely that you are experiencing downstream packet loss.
If your ping is high it could be because you are near the downstream limit of your connection. If this is the case then try lowering the ‘Cfg.NetcodeServerFramerate’ setting using the ‘serverframerate’ command.
If your ping is low, it may be because you are experiencing downstream packet loss. If this is so, try increasing your ‘Cfg.NetcodeServerFramerate’ setting using the ‘serverframerate’ command.
4. Other players are jerky, but my FPS is high
———————————————-
Make sure you have the ‘Cfg.NetcodeEnemyPredictionInterpolation’ set to true, by typing using the command enemyinterpolation 1.
In addition try increasing your server-to-client update rate using ‘serverframerate’. Recommended values are in the range 10-30.
5. My mouse movement seems sluggish, is this lag?
————————————————-
No. Try testing with ‘Smooth Mouse’ off (found in Options|Controls in the Painkiller menu). If you are using a PS2 mouse, check that the sample rate is high from Control Panel within Windows.
Make sure you have the latest mouse drivers/software.
Also make sure that your framerate is not dropping. (See 7)
6. I think I am getting lag in fights or with more players on the server
————————————-
This may be down to netcode lag, or it may be down to rendering framerate (FPS) drops. Firstly you should confirm it is not an FPS drop (see 7).
If you believe that it is netcode, lower your netcode settings.
7. My FPS drops a lot with more players on the server
—————————————————–
To see your framerate, type ‘showfps 1’ in the console. If your FPS drops a lot you may percieve this as lag or sluggish behaviour.
You may find it more playable to set your FPS to a lower limit, so that rendering happens at a constant rate. You can do this by editing your config to set ‘Cfg.MaxFpsMP’ to your new limit or typing ‘setmaxfps xx’ in the console, where xx is your required framerate.
Painkiller, like any new game, has high system demands. If your framerate is low, you should ensure that your video settings are set to ‘Fastest’ to improve your FPS, and make sure you have the latest hardware drivers.
8. Other players are telling me I am warping
———————————————
This might be either because you have a low setmaxfps setting, or a low clientbandwidth limit, or that your upstream is experiencing packet loss.
If you suspect your upstream is suffering from packet loss, try increasing ‘Cfg.NetcodeMaxPlayerActionsPassed’ slightly, in the range 1-5.