Serious Sam Classic: The First Encounter

Serious Sam Classic: The First Encounter

Ikke nok vurderinger
How to fix ping in your Dedicated Server
Av Melody
This guide explains how to fix your dedicated server pinging too much.
   
Utmerkelse
Favoritt
Favoritter
Fjern som favoritt
Before we start
Please note that miracles are not proven 100% to exist.

This guide helps setting up your Dedicated Server in order to fix absurd ping, by using some commands and setting up your system.

In my own server, I got a ping reduction from 95-120 ms to 39 ms (NOT A LOCAL SERVER!):


For best results, users connecting to your server also need to follow the tweaks when requested in the sections of this guide.
System Tweaks
Note: for best results, these tweaks must be applied by users as well.

First tweak: Enable Fast TCP in your system
1) Open your Registry Editor[www.lifewire.com]
2) Reach HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
3) For each Interface, add the following DWORD (32-bit) values:
TcpAckFrequency with value: 1 TcpDelAckTicks with value: 0 TCPNoDelay with value: 1
4) Reboot

Second Tweak: Set QoS properly (server only)
Note: This tweak may be applied by users as well, but it is not proven to give any benefit if clients do it. Only doing it on the server is actually required.
1) Open Local Group Policy Editor[www.tenforums.com]
2) Open Windows Settings
3) Right click "Policy-based QoS" and click "Advanced QoS settings"
4) Tick "Specify the inbound TCP throughput level"
5) Tick "Level 1"
6) Switch to "DSCP Marking Override" tab
7) Tick "Control DSCP marking requests from applications and services"
8) Tick "Allowed"
9) Click "OK"
10) Expand "Policy-based QoS"
11) Click on Action -> Create new Policy
12) Set Policy name to, for example, "TFE Server"
13) Set DSCP value to 46 (important)
14) Click Next and follow the instructions
15) Reboot
Server Tweaks
Open Scripts\Dedicated_startup.ini with your favorite text editor and add the following commands to the bottom of it:
ser_iMaxAllowedBPS = 2147483647; net_iCompression = 0; ser_tmSyncCheckFrequency = 0.1; ser_iSyncCheckBuffer = 6;
Save the file.
Client Tweaks
Open Scripts\NetSettings\LAN.ini with your favorite text editor
Replace everything with the following:
cli_bPrediction = 0; cli_iBufferActions = 1; cli_iMinBPS = 128; cli_iMaxBPS = 2147483647; net_iCompression = 0;
Save the file.
Open Serious Sam, go to Settings -> Network and set the Connection to LAN. Always click "LAN Gaming" when joining your server from now on.
16 kommentarer
Lejionator 15. des. 2021 kl. 8.12 
Great guide! Congratz! :gman:
Marco 20. aug. 2019 kl. 3.09 
Hmm, seeing this right now because of a notification... @Melody, he just said xD putting a "kurwa" in the middle, which in this context means "fuck!". He is just trolling...

@Zdzichu Damn, you are good! Wow.
Melody  [skaper] 20. jan. 2019 kl. 13.34 
@Zdzichu
?
Zdzichu 20. jan. 2019 kl. 13.10 
Iks kurwa De
Melody  [skaper] 15. des. 2018 kl. 8.04 
@Marco
I can only say that you're entirely right about everything, but SS Classic's netcode is what it is, unfortunately. These fixes only work if you already have low ping to the server (let's say, 60 ms and below) and I don't recommend putting them in all servers, expecially if casual play / fun play is your goal.

Predicting with high ping is also indeed a skill factor, and I know that since I used to play UT2004 with 200+ ms ping in 2004, but it was justified when all players had a relatively high ping at the same time (in 2004-2007 everyone had crappy connections that would ping at least 50 ms in very close servers), so every single player had *almost* the same ping or, at least, similar disadvantages.

When it comes to 2018/2019, you're definitely going to find people with ~20 ms ping with no packet loss and no jitter, so the ping-prediction skill factor doesn't even count anymore since all those people literally play just like if they were hosting.
Marco 15. des. 2018 kl. 6.43 
Then, you are modding the SDK and you may already have found this bug and other minor ones (such as double kill bug and swimming bug). I wrote that stuff above because the mainstream SS servers don't have your netcode fixes yet, so they still work in the same old way. ;)

The mouse jerky movement in 3rd person, from my point of view, looks much more evident when prediction is disabled. When disabling mouse acceleration on both Windows and Sam, it appears to be less annoying even it still exists.

That said, I wish the best for your work in progress!

[QUOTE: Melody]
it can be disabled through a command, but I don't remember which one and I'm too lazy to search for it right now[/quote]

I didn't check the whole ShellSymbols.txt list nor tested anything yet, so I will try to guess:

net_iExactTimer?

[3/3]
Marco 15. des. 2018 kl. 6.41 
And, a consideration about playable ping.

This is a very long story in Serious Sam Classic... Anyway, on forums like GameZone24 and SeriousZone (unfortunately disappeared with all its threads) and maybe somewhere else (GameMecca, SeriousSam.su?) , many gamers discussed a lot about the "screen-shaking" issue under 54 ms of ping, especially when "cli_iBufferActions" was set to 1, and it was 2004-2007 era (there were german gamers playing on german servers at that time).

Then, they figured out that, in order to avoid this, a player should have to set "i_BufferActions" to 2, if he/she has got a good connection, and then raising the ping at 80-90 ms.

That you say (ping must be <50 ms) is not wrong, especially for modern FPSs, but it is relative if you consider the skill varies from player to player (I'm sure you know better than me about PointMan winning on SSHD's italian servers with 109 ms). In Sam Classic it's a bit different because of the netcode, though. [2/3]
Marco 15. des. 2018 kl. 6.41 
Hi Melody,

I would like to wrote this in italian, but... Since the section "Languages" displays "English", I can't. ;P

I have a question about this tutorial:

- At BPS variables (both ser and cli), is that sure client must have same BPS as server?

Let's suppose I have to start a dedicated Coop at Serious diff, only me and my brother (we usually do at Christmas time, no speedrun and FF OFF). If I set a value in Bytes per Second as much as my connection can handle (keeping in mind that I have to set 10% lower than that) for "ser" variable, do I also need to set like that even for the "cli" one? Shouldn't it supposed to be half of maxBPS for me and half for my brother inside our "cli" NetSettings?

Also, the number you show as an example is an odd number. I remember you recommended me to set an even number (see comments section below the SS review by Clow) in order to avoid packet lossing. [1/3]
Supersniper98 13. des. 2018 kl. 4.00 
Very interesting) A personal version, I would like to see... although I am a bit cautious about something that involves netcode tweaking, since I already saw the failure by the name "SS Revolution", where the netcode was destroyed in order to stop bad syncs...
I will go right ahead and add you...
Supersniper98 13. des. 2018 kl. 4.00 
Don't worry, I am not mad that you deleted my comment (maybe a bit lol) ... In it I explained what this problem is, why it occurs and also I said that my goal is not casual gaming - otherwise I would not give a damn about this game/guide... thing is: "Competitive gaming" does not exist indeed in 2018 in this game.... you should have known when you wrote the guide... so we have to deal with less "professional/competitive" circumstances on tournamnets/duels etc as well. My point was that I could achieve the same effects with only 1 tweak on server side, hence not creating this problem. And besides, you say that this "acknowledge rate" needs to be improved in order for this problem to not occur, and this could be achieved via a command. So in reality the problem remains because you did not feature the command in the guide in the first place!