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