• Hey Guest. Check out your NeoGAF Wrapped 2025 results here!

What makes for good netcode?

DocSeuss

Member
I've debated with myself an awful lot on whether or not my game should have multiplayer. For now, I've opted against it--I simply don't have the programming capability to do it, and finding a programmer to work with has proven about as challenging as I figured, which was nigh-impossible.

Reading a lot about netcode, however, has been pretty interesting, and I find myself wondering about the various implementations of such.

So, yeah.

What makes for good netcode in a game, especially a shooter? Got any examples of good netcode?
 
Do everything DICE don't.

Seriously, I'm not qualified enough to answer that question but I'd be interested in hearing some answers.
 
I'm sure it's a combination of things, but surely updates from client to server and vice versa (tickrate??) is the most important.
 
Rollback.

That is, masking lag by guessing at opponent inputs until they're received, then rolling the gamestate backwards and replaying it with local inputs (altering the current gamestate to reflect any changes between the two).

On my end, and your end, we feel as if there is little to no lag. This is what (good) FPS games do, and why killcams often look different from what you remember seeing.
 
Quake 3 has divine netcode crafted by gods. Most modern games are varying levels of terrible. Source games are pretty solid and Black Ops 1 was pretty damn tight with the dedicated servers on PC.
 
No lag for the person commenting on said netcode = good netcode.

Honestly I can't help with the technical part, but it's interesting how opinions on it vary so greatly. I feel bad for the coders because of the dozens of variables which contribute to the perception of a game's "netcode".
 
The more internets a game has the better the netcode. Dedicated severs double your internets, and the cloud gives you infinite internets. It really is that simple.

I wish more games had better netcode /:
 
R8u9cr5.gif
Dont follow Bf4 example.
 
No lag for the person commenting on said netcode = good netcode.

Honestly I can't help with the technical part, but it's interesting how opinions on it vary so greatly. I feel bad for the coders because of the dozens of variables which contribute to the perception of a game's "netcode".

It's a pretty straightforward problem to solve, provided the game is written in such a way to allow for the state to be rewound/resimulated many times faster than real-time.

Assume the worst-possible network configurations and lag. Make the code work well in those situations, and it will work well in the ideal situation.
 
Something that deals with the realities of multiple people using udp and often with misconfigured settings. I use to respect valve netcode but largely since they introduced interp and the like most of the problems have gotten worse. Not all of it was bad but the fact they don't have a netcode that adapts to one connection be it server or client is pathetic these days.

I get better registry in Crysis 2 or 3 than I can in CS GO despite being able to play betas 1.6 or source just fine.

Features of good netcode

Use data inputs well in terms of allowing people to register
One that doesn't encourage ping benefits
One that doesn't allow users to misconfigure for advantages
One that doesn't rubberband me too much or in a nasty jarring manner

I say this as a competitive gamer who played in tournies for fighters and fps games, the difference between lan, offline vs online is huge. Wish more devs would take online netcode more serious as that is the difference between if I play a game between a few weeks or months/years.
 
Not all all qualified to answer, but it seems to me that it's all about complexity. Games like Battlefield and Arma have what most consider horrible net code. But then each and every bullet in those games have properties like travel time, bullet drop, ect. Then you've got COD and CS, which are largely regarded as having great net code, but they don't have any of those features and the hit registration isn't even server side.
 
I don't understand how games like quake had way better netcode than games today. I was on Dial Up and never experienced the lag I have sometimes on games today. I know alot of the problem is more peer to peer games but QuakeWorld was the shit.
 
Here's what I want to know, as I have no knowledge of how that all works:

How can quake 2 have no lag whatsoever on dial up, yet I get lag to hell and back on bf4 with a 50mbps download connection?

Edit: apparently beaten.
 
I don't understand how games like quake had way better netcode than games today. I was on Dial Up and never experienced the lag I have sometimes on games today. I know alot of the problem is more peer to peer games but QuakeWorld was the shit.
It's probably more of a hitscan vs. projectile weapon thing. Quake games have mostly projectile based weapons.
 
When i shoot someone before they shoot me and they die. Instead of me shooting them a billion times..ducking around a boulder to reload..and getting killed through 4 layers of rock.
 
Here's what I want to know, as I have no knowledge of how that all works:

How can quake 2 have no lag whatsoever on dial up, yet I get lag to hell and back on bf4 with a 50mbps download connection?

Edit: apparently beaten.

The Glory Days are over man :( Now people pay for peer to peer. I wish you could host console game servers on your pc...I would host all kinds of servers all the time for games.
 
I don't understand how games like quake had way better netcode than games today. I was on Dial Up and never experienced the lag I have sometimes on games today. I know alot of the problem is more peer to peer games but QuakeWorld was the shit.

On dial up people had different mtus and other settings. One beef I have about the current gaming environment is high mtu. I've done enough benchmarks and using anything well above 1000 begins to introduce jitter and higher latency. Lower it to 750 or 576 and the response comes back. Also in the dialup era you didn't have to deal with routers/broandband modems in residential homes which introduce a world problems most are unaware they do as nat and sip add a lot of bullshit when not done right.
 
Quake 3 has divine netcode crafted by gods. Most modern games are varying levels of terrible. Source games are pretty solid and Black Ops 1 was pretty damn tight with the dedicated servers on PC.

Counter Strike 1.6 has amazing netcode too, that's why it's still played to this day. But that should be expected since GoldSrc is based on the Quake engine.


BF3=bad netcode, i saw that happen to me many times so much i said fuck BF3 and quit..


Yeah, Battlefield 4 is plagued by these issues too. It is a combination of low tic rate and some sort of data packet compression problem. For example, if you die from a one shot death, it's usually because of late data packets making it look like you were killed in one shot, when in reality the other player was already firing at you milliseconds/ second in advance.
 
Whatever you do, don't do stop-n-wait like those fools at 2k Sports did (and still do in some part) for years and years.
 
The appropriate compensation for latency.

Pretty much this. If the game remains playable and interpretable by the user during moments of latency or packet loss, it's good. Some games achieve this by having the animation not quiiiiiite match what's actually occurring for all users, but in some games (like fighting games) this is not really acceptable.
 
Do everything DICE don't.

Seriously, I'm not qualified enough to answer that question but I'd be interested in hearing some answers.

Yeah... I really don't get how EA can have such vastly different experiences in some properties versus others.

For all of their faults, EASports has the best netcode for any sports games... Madden, NCAA, NHL run incredibly well online. I don't have experience with Fifa, but at least Madden and NCAA -- on decent connections -- basically play as if they're offline games. Some times you get lag with button presses during menus or kickoffs, but otherwise, you'd think you were playing offline. Hell, MVP '06 on my old ass cable internet connection, ran better than MLB The Show '13 does on my 100Mbps down.
 
I dont know how they did it for the year it was released (1998), but Starsiege Tribes, 128 players, huge map (for the time) and having to share projectile/vehicule/item/player position in 3D, was quite playable on 56k (not server side obviously).

What happened since then? I thought it was supposed to evolve.
 
Instant and consistent feedback that does a good job at making all players see the same thing (something client side prediction fails at miserably, it just gives the illusion of being good netcode while giving a horrible and out of synch experience for everyone involved)

An example of good netcode is cs 1.x on the half life engine
no prediction shenanigans , if you lag you will know it (warping) if you have packet loss you will know it (hitreg will fail) and if you have a good connection it will be pure and glorious

If only developers and publishers would let the community host their own servers like before, then they wouldn't have to try so hard to fake a good connection and everyone could enjoy a good , consistent and synched multiplayer experience
But no, can't let them do that as then you can't control your game fully and people can modify the servers and run their own content and you can't shove your shitty dlc and map packs down their throat quite as easily.


if you want to play a multiplayer shooter there is quake 3 and cs 1.6, that is literally it as far as good netcode goes
 
Payday has always amused me because the enemy AI would run off and I'd be killing it, and my friends would be like "what are you shooting?" 'cause they're in Europe and I'm in the US, so I'm lagging. At some point, the client takes over the AI, so you have two different AI showing up and registering stuff. It's really weird.

Not including idtech 5 lol.

Not the route my head was taking me, no.
 
Instant and consistent feedback that does a good job at making all players see the same thing (something client side prediction fails at miserably, it just gives the illusion of being good netcode while giving a horrible and out of synch experience for everyone involved)

An example of good netcode is cs 1.x on the half life engine
no prediction shenanigans , if you lag you will know it (warping) if you have packet loss you will know it (hitreg will fail) and if you have a good connection it will be pure and glorious

If only developers and publishers would let the community host their own servers like before, then they wouldn't have to try so hard to fake a good connection and everyone could enjoy a good , consistent and synched multiplayer experience
But no, can't let them do that as then you can't control your game fully and people can modify the servers and run their own content and you can't shove your shitty dlc and map packs down their throat quite as easily.


if you want to play a multiplayer shooter there is quake 3 and cs 1.6, that is literally it as far as good netcode goes
Exactly. The fact that many of them don't have server browsers (Battlefield being the exception, but that doesn't allow you to host your own local server) only aggravates the problem. Though games hat have peer to peer matchmaking are probably worse in this regard, as you never know if your host is gonna have a good connection or not. At least with server browsers, you get to see if the host isn't a laggy mess by simply looking at the ping number. I just don't get why many devs want to choose the matchmaking only option, because if you've got bad netcode, you're screwed.
 
adjustable by the client, and scalable across many different latencies. Lag compensation is nice and all but its terrible when the values are set to the bare minimum.
 
I dont know how they did it for the year it was released (1998), but Starsiege Tribes, 128 players, huge map (for the time) and having to share projectile/vehicule/item/player position in 3D, was quite playable on 56k (not server side obviously).

What happened since then? I thought it was supposed to evolve.
Tribes had the best netcode I've ever played considering the size and scale of players and maps, as well as the time frame that game existed in.

Plus, if you were on a laggy connection you could account for it and compensate, instead of getting horrible client side interpretation/rubber banding.
 
Instant and consistent feedback that does a good job at making all players see the same thing (something client side prediction fails at miserably, it just gives the illusion of being good netcode while giving a horrible and out of synch experience for everyone involved)

An example of good netcode is cs 1.x on the half life engine
no prediction shenanigans , if you lag you will know it (warping) if you have packet loss you will know it (hitreg will fail) and if you have a good connection it will be pure and glorious

If only developers and publishers would let the community host their own servers like before, then they wouldn't have to try so hard to fake a good connection and everyone could enjoy a good , consistent and synched multiplayer experience
But no, can't let them do that as then you can't control your game fully and people can modify the servers and run their own content and you can't shove your shitty dlc and map packs down their throat quite as easily.


if you want to play a multiplayer shooter there is quake 3 and cs 1.6, that is literally it as far as good netcode goes

Interp was the problem during the 1.x era so much so that valve in updates to SRC engine and every version since has tried various solutions with no true resolution.

There were good and bad things about that era of the engine but interp led to more problems than it solved. Valve letting people setup their own servers with their own values and ticrates was good same for plugins that can control peoples rates.
 
Good netcode:

-hides lag
-tolerates high lag and lost packets without durably desynchronizing
-places all players on equal footing

that's pretty much it but of course that requires a lot of technical work.
 
id netcode for Quake 3

Epic netcode for Unreal Tournament 99

I'm way behind the times but netcode then just seemed sublime (could be rose tinted glasses).
 
Practically every game that tries too hard to even out between low and high pingers has bad net code.
The HL1 engine eventually got really good netcode due to some updates (from pretty good, around 2002~ iirc), and the id games always had fantastic ones.
Yeah... I really don't get how EA can have such vastly different experiences in some properties versus others.

For all of their faults, EASports has the best netcode for any sports games... Madden, NCAA, NHL run incredibly well online. I don't have experience with Fifa, but at least Madden and NCAA -- on decent connections -- basically play as if they're offline games. Some times you get lag with button presses during menus or kickoffs, but otherwise, you'd think you were playing offline. Hell, MVP '06 on my old ass cable internet connection, ran better than MLB The Show '13 does on my 100Mbps down.

Yeah, EASports games actually have way better net code than you would expect from a sports game with such a wide audience. However, once everywhile you only get opponents with bad connection, it should be easier to check that, than trying to see if it lags when you switch team and or any unreliable solution like that.
 
Depends on the genre really and even among FPS it can/should be radically different. Nevertheless, it is best when you forget you are playing online.
 
Top Bottom