Upvote Upvoted 0 Downvote Downvoted
Why does Source games netcode feel wrong?
posted in Q/A Help
1
#1
0 Frags +

Is there any reason why TF2 netcode feels like its held together with ductape compared to other games?

For comparison, in Quake 3/Live when you hit someone with hitscan you instantly hear the hitsound, but in TF2 the hitsound has a delay dependant on your ping, like if the server has to check back if you hit the player instead of the client itself. Like in QLive it feels like real time, even rockets seem to "come out" instantly even with 80 ping but in TF2 it seems to be server-dependant and the hitsound and projectiles are delayed depending on your ping.

Its like the netcode and hitreg of TF2 waits for the server confirmation idk can someone smart explain it to me?

Is there any reason why TF2 netcode feels like its held together with ductape compared to other games?

For comparison, in Quake 3/Live when you hit someone with hitscan you instantly hear the hitsound, but in TF2 the hitsound has a delay dependant on your ping, like if the server has to check back if you hit the player instead of the client itself. Like in QLive it feels like real time, even rockets seem to "come out" instantly even with 80 ping but in TF2 it seems to be server-dependant and the hitsound and projectiles are delayed depending on your ping.

Its like the netcode and hitreg of TF2 waits for the server confirmation idk can someone smart explain it to me?
2
#2
23 Frags +

They are literally the same code

They are literally the same code
3
#3
0 Frags +

Mat_queue_mode -1; snd_mixahead .0375 if you want it right away

I never had any problems unless the hosting can't keep up

Mat_queue_mode -1; snd_mixahead .0375 if you want it right away

I never had any problems unless the hosting can't keep up
4
#4
0 Frags +

Because Quake runs at like 5000 fps. It also does a thing that makes it so you don't lag compensation over 80 ping so you have to lead your shots. Tf2 doesn't run well and has really fucked up lag compensation that allows things like getting facestabbed by a 300 ping spy your looking when you have 20 ping. I've been bored and playing pubs recently and most of the servers are horrible which is also part of the problem.

Because Quake runs at like 5000 fps. It also does a thing that makes it so you don't lag compensation over 80 ping so you have to lead your shots. Tf2 doesn't run well and has really fucked up lag compensation that allows things like getting facestabbed by a 300 ping spy your looking when you have 20 ping. I've been bored and playing pubs recently and most of the servers are horrible which is also part of the problem.
5
#5
9 Frags +
ShitposterBecause Quake runs at like 5000 fps. It also does a thing that makes it so you don't lag compensation over 80 ping so you have to lead your shots. Tf2 doesn't run well and has really fucked up lag compensation that allows things like getting facestabbed by a 300 ping spy your looking when you have 20 ping. I've been bored and playing pubs recently and most of the servers are horrible which is also part of the problem.

ql/q3 are limited to 250 fps client side and the default server tickrate is 30

[quote=Shitposter]Because Quake runs at like 5000 fps. It also does a thing that makes it so you don't lag compensation over 80 ping so you have to lead your shots. Tf2 doesn't run well and has really fucked up lag compensation that allows things like getting facestabbed by a 300 ping spy your looking when you have 20 ping. I've been bored and playing pubs recently and most of the servers are horrible which is also part of the problem.[/quote]
ql/q3 are limited to 250 fps client side and the default server tickrate is 30
6
#6
-1 Frags +
gedu ql/q3 are limited to 250 fps client side and the default server tickrate is 30

I'm well aware. I was mostly just saying it always runs good even on shitty pcs and doesn't really have framedrops so it feels consistent and smooth.

[quote=gedu] ql/q3 are limited to 250 fps client side and the default server tickrate is 30[/quote]

I'm well aware. I was mostly just saying it always runs good even on shitty pcs and doesn't really have framedrops so it feels consistent and smooth.
7
#7
-4 Frags +
RockzMat_queue_mode -1; snd_mixahead .0375 if you want it right away

what i mean is that if you hit a shotgun or a rail in quake3, you hear the hitsound instantly even if you had 100ms latency, but in tf2 with the same ping, even if you reduce the sound delay, you will first hear your shotgun and 100ms later hear the hitsound

twiikuuThey are literally the same code

is it based on quake 3 for real? considering quake 3 netcode is different from quake 2, and quake 2 is the one that people claim valve based the half-life 1 engine on.
Also from what i read, Quake 3 uses UDP, while TF2/Quake 2 use TCP

[In Q3] the server never sits around waiting for an acknowledgement. As a result, latencies are much lower than if you have code that sits there twiddling its thumbs waiting for a synchronous ACK. -Source
[quote=Rockz]Mat_queue_mode -1; snd_mixahead .0375 if you want it right away[/quote]
what i mean is that if you hit a shotgun or a rail in quake3, you hear the hitsound instantly even if you had 100ms latency, but in tf2 with the same ping, even if you reduce the sound delay, you will first hear your shotgun and 100ms later hear the hitsound
[quote=twiikuu]They are literally the same code[/quote]
is it based on quake 3 for real? considering quake 3 netcode is different from quake 2, and quake 2 is the one that people claim valve based the half-life 1 engine on.
Also from what i read, Quake 3 uses UDP, while TF2/Quake 2 use TCP
[quote][In Q3] the server never sits around waiting for an acknowledgement. As a result, latencies are much lower than if you have code that sits there twiddling its thumbs waiting for a synchronous ACK. [url=https://fabiensanglard.net/quake3/The%20Quake3%20Networking%20Mode.html]-Source[/url][/quote]
8
#8
10 Frags +
sagetwiikuuThey are literally the same codeis it based on quake 3 for real? considering quake 3 netcode is different from quake 2, and quake 2 is the one that people claim valve based the half-life 1 engine on.

q3's pretty much defined modern FPS netcode, source introduced some optimizations with no major changes
- packets are sent over UDP/IP, some redundancy and buffering is involved
- server sends diffs of the world state according to ack'd client state
- clients extrapolate their own state (movement/hitscan) and interpolate the state of the world
- backward reconciliation is used in case of misprediction

sageTF2 use TCP

TF2 solely uses UDP for the gameplay netcode, TCP is used for RCON
I can't speak for Q2 but I highly doubt it uses TCP, it would otherwise be unplayable with ping and packet loss

There's some to remember:
Netcode can never be perfect online (until everyone gets hooked to fiber and a solution is found for routing I guess)
There'll always have to be downsides somewhere
Not every issue you see is caused by netcode, hitsound in TF2 requires a roundtrip because the client doesn't predict the damage caused

[quote=sage][quote=twiikuu]They are literally the same code[/quote]
is it based on quake 3 for real? considering quake 3 netcode is different from quake 2, and quake 2 is the one that people claim valve based the half-life 1 engine on.[/quote]
q3's pretty much defined modern FPS netcode, source introduced some optimizations with no major changes
- packets are sent over UDP/IP, some redundancy and buffering is involved
- server sends diffs of the world state according to ack'd client state
- clients extrapolate their own state (movement/hitscan) and interpolate the state of the world
- backward reconciliation is used in case of misprediction


[quote=sage]
TF2 use TCP
[/quote]
TF2 solely uses UDP for the gameplay netcode, TCP is used for RCON
I can't speak for Q2 but I highly doubt it uses TCP, it would otherwise be unplayable with ping and packet loss


There's some to remember:
Netcode can never be perfect online (until everyone gets hooked to fiber and a solution is found for routing I guess)
There'll always have to be downsides somewhere
Not every issue you see is caused by netcode, hitsound in TF2 requires a roundtrip because the client doesn't predict the damage caused
9
#9
-3 Frags +

just because the general architecture or features are the same, does not mean the code is the same and has the same performance.

this feeling about tf2 could be related to some "critical" events in tf2 like getting stabbed or head shotted where the player is very aware when he gets screwed whereas in quake there are consistant hitboxes and no head shots.

just because the general architecture or features are the same, does not mean the code is the same and has the same performance.

this feeling about tf2 could be related to some "critical" events in tf2 like getting stabbed or head shotted where the player is very aware when he gets screwed whereas in quake there are consistant hitboxes and no head shots.
Please sign in through STEAM to post a comment.