NS2 Netcode

douchebagatrondouchebagatron Custom member title Join Date: 2003-12-20 Member: 24581Members, Constellation, Reinforced - Shadow
<div class="IPBDescription">info?</div>Last we heard anything mentioned about the netcode for ns2 was when Max said that it hadn't been done yet a long time ago. I'm very interested in the netcode, I'm actually doing my masters thesis on data distribution over the internet and find a lot of interesting things such as the shortcomings of TCP and things of the sort. I'm curious as to what methods you are using and any testing that you've done on it and how it performs.
«13

Comments

  • remiremi remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
    edited September 2009
    This is actually my biggest worry about their custom engine. Physics are pretty easy to get right, graphics don't really matter, but networking directly affects player experience AND is hard to get right.

    and with that... i'm going to go work on my Networking homework...
  • homicidehomicide Join Date: 2003-11-10 Member: 22451Members
    Screenshot of NS2 netcode:

    <img src="http://www.wallpaperbase.com/wallpapers/movie/matrix/matrix_5.jpg" border="0" class="linked-image" />
  • JAmazonJAmazon Join Date: 2009-02-21 Member: 66503Members
    ^^^ I always knew max would have something to do with the matrix...now how about skynet :O
  • FaskaliaFaskalia Wechsellichtzeichenanlage Join Date: 2004-09-12 Member: 31651Members, Constellation
    edited September 2009
    Max did a wonderful job with TQs engine. And I am confident, that he expanded his knowledge and will deliver a wonderful netcode aswell.
    In Max we trust!
  • MuYeahMuYeah Join Date: 2006-12-26 Member: 59261Members
    We were told Max dislikes the Quake3 netcode and likes the source netcode. We pointed out that source has pretty bad hitscan registry, how frustrating big hits with slow RoF on source (scattergun in TF2, i.e. bite) can be and so on and how Q3 has awesome registry and 'feels' right. Apparently when you have high ping it's the other way round and Q3 becomes like arse. The devs are interested in getting the feel right though, apparently.

    Take this all with a grain of salt.
  • TekoppenTekoppen Join Date: 2008-02-05 Member: 63584Members, NS2 Playtester, Reinforced - Shadow, Subnautica Playtester
    <!--quoteo(post=1729032:date=Sep 27 2009, 03:40 AM:name=Psyke)--><div class='quotetop'>QUOTE (Psyke @ Sep 27 2009, 03:40 AM) <a href="index.php?act=findpost&pid=1729032"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->This is actually my biggest worry about their custom engine. Physics are pretty easy to get right, graphics don't really matter, but networking directly affects player experience AND is hard to get right.

    and with that... i'm going to go work on my Networking homework...<!--QuoteEnd--></div><!--QuoteEEnd-->

    I don't think we have anything to worry about, our money is in great hands. I don't know if I'm alone with these thoughts, but I think Max knows what he is doing.
  • sherpasherpa stopcommandermode Join Date: 2006-11-04 Member: 58338Members
    edited September 2009
    They know what they're doing when it comes to netcode- but I was disappointed when we had the chat with the devs and Flayra said Max isn't a fan of the (opensource!) Quake 3 netcode. As mu said- Max doesn't like it in high ping situations. I don't think high latency games should be borne in mind when choosing a netcode- they're always crap regardless (you can have UT-style netcode (no prediction) where there's a delay in your actions and opponents teleport or HL-style (lots of client prediction) where it's smooth as butter but so 'spongy' it's just as frustrating- it just tries to disguise it).

    Some months back the twitter feed told us they were trying some opensource netcodes- one was an acronym I had never heard of, the other I can't remember(!) but the 3rd was the Tribes one. Never played Tribes online but I do question if netcode designed for large, open maps with 64 player slugfests would be suitable for a small-scale corridor shooter.

    Still, Flayra said changing the netcode was a relatively simple task so I'm hoping if their chosen netcode bombs out (the competitive community will kick up a huge stink if it does) then we can whine at Max persuading him to try Q3. I think most competitive players would make it their preferance.
  • BacillusBacillus Join Date: 2006-11-02 Member: 58241Members
    The only thing I don't like in Quake live netcode is the hitbox position quite far behind the model. I'm not actually sure how much the hitbox actually lags, but while railgunning you certainly feel you're shooting far behind the movement. On Quake it still works nicely, but I think in NS dodging the effect might be bigger. For example the laggy lerk hitbox might be easier to track when you've got more time to react to the next change of direction.
  • ghost in the shellghost in the shell Join Date: 2008-09-28 Member: 65094Members
    I think there has already been some mention of the Tribes 2 net code.
    There were some really good papers on line about all the optimizations they did for it.
    For those of you who are unfamiliar with Tribe, it was a massive game (on the scale of bf2), able to support 64+ players with no lag
  • JAmazonJAmazon Join Date: 2009-02-21 Member: 66503Members
    tribes 2 = my middle school education O_o
  • OroxOrox Join Date: 2005-01-07 Member: 33139Members, Constellation
    I can support everything that is NOT HL netcode. So much frustration to be killed in a corner.
  • PhiXXPhiXX Join Date: 2008-10-22 Member: 65274Members
    <!--quoteo(post=1729121:date=Sep 27 2009, 09:12 PM:name=Orox)--><div class='quotetop'>QUOTE (Orox @ Sep 27 2009, 09:12 PM) <a href="index.php?act=findpost&pid=1729121"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I can support everything that is NOT HL netcode. So much frustration to be killed in a corner.<!--QuoteEnd--></div><!--QuoteEEnd-->
    u mean around a corner :D yeah I hate it so much...
  • OpprobriousOpprobrious Join Date: 2008-11-17 Member: 65483Members
    <!--quoteo(post=1729070:date=Sep 27 2009, 06:14 AM:name=sherpa)--><div class='quotetop'>QUOTE (sherpa @ Sep 27 2009, 06:14 AM) <a href="index.php?act=findpost&pid=1729070"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->They know what they're doing when it comes to netcode- but I was disappointed when we had the chat with the devs and Flayra said Max isn't a fan of the (opensource!) Quake 3 netcode. As mu said- Max doesn't like it in high ping situations. I don't think high latency games should be borne in mind when choosing a netcode- they're always crap regardless (you can have UT-style netcode (no prediction) where there's a delay in your actions and opponents teleport or HL-style (lots of client prediction) where it's smooth as butter but so 'spongy' it's just as frustrating- it just tries to disguise it).

    Some months back the twitter feed told us they were trying some opensource netcodes- one was an acronym I had never heard of, the other I can't remember(!) but the 3rd was the Tribes one. Never played Tribes online but I do question if netcode designed for large, open maps with 64 player slugfests would be suitable for a small-scale corridor shooter.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Who cares one wit about high latency players?

    That is taking the netcode the exact OPPOSITE way it should be going. Less prediction, more accuracy is the ONLY fair way to do it.
  • noncomposmentisnoncomposmentis Join Date: 2004-11-13 Member: 32773Members
    Admittedly, my only real experience with source netcode was TF2, but I had no real problems with it. It fixed my biggest issues with HL, which was the springy high latency players and the teleporting dropped packet players. TF2, obviously, doesn't have to handle nearly as much speed as NS, which may have been most of the problem. I don't have an issue with prediction, I think it's a necessary solution for online play. <i>The problem with HL was that you were at the mercy of someone else's connection.</i> The only variable should be your connection.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    <!--quoteo(post=1729065:date=Sep 27 2009, 03:43 AM:name=MuYeah)--><div class='quotetop'>QUOTE (MuYeah @ Sep 27 2009, 03:43 AM) <a href="index.php?act=findpost&pid=1729065"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->We were told Max dislikes the Quake3 netcode and likes the source netcode. We pointed out that source has pretty bad hitscan registry, how frustrating big hits with slow RoF on source (scattergun in TF2, i.e. bite) can be and so on and how Q3 has awesome registry and 'feels' right. Apparently when you have high ping it's the other way round and Q3 becomes like arse. The devs are interested in getting the feel right though, apparently.

    Take this all with a grain of salt.<!--QuoteEnd--></div><!--QuoteEEnd-->

    UT3 has horrid prediction code, making any lag beyond around 100ms ping nearly impossible to hit/register properly at decent ranges. Thank goodness neither of those came up as Max's idea of awesome netcode.


    Also, beware of randomly slapping engine code around. If you do stupid stuff, it doesn't matter how good the engine's netcode is. See early Empires builds where turrets caused major lag since they updated their angles every frame. Very, very stupid.
  • poonzer69poonzer69 Join Date: 2009-09-27 Member: 68889Members
  • SopsSops Join Date: 2003-07-03 Member: 17894Members, Constellation
    It is an access code that drops a net on people.
  • poonzer69poonzer69 Join Date: 2009-09-27 Member: 68889Members
    <!--quoteo(post=1729206:date=Sep 28 2009, 03:46 AM:name=Sops)--><div class='quotetop'>QUOTE (Sops @ Sep 28 2009, 03:46 AM) <a href="index.php?act=findpost&pid=1729206"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It is an access code that drops a net on people.<!--QuoteEnd--></div><!--QuoteEEnd-->

    lol wtf?

    like in game or rl???!?

    cuz net goin on nsum1 in rl i kidna werid.. but inthe game itkidna makes sence wonce u think bout it.

    like u shot web on slkuk and they dont come eat you nymore that would be awesome.
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    Max already mentioned they've integrated a few netcode libraries already, they haven't rewritten it from scratch.
  • ghost in the shellghost in the shell Join Date: 2008-09-28 Member: 65094Members
    <!--quoteo(post=1729109:date=Sep 27 2009, 12:38 PM:name=JAmazon)--><div class='quotetop'>QUOTE (JAmazon @ Sep 27 2009, 12:38 PM) <a href="index.php?act=findpost&pid=1729109"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->tribes 2 = my middle school education O_o<!--QuoteEnd--></div><!--QuoteEEnd-->
    Lol same here
    loved that game till I got hl and halo.
    could have been a great game if only ppl used teamwork
    middle schoolers killed that...
  • JAmazonJAmazon Join Date: 2009-02-21 Member: 66503Members
    <!--quoteo(post=1729340:date=Sep 28 2009, 06:25 PM:name=ghost in the shell)--><div class='quotetop'>QUOTE (ghost in the shell @ Sep 28 2009, 06:25 PM) <a href="index.php?act=findpost&pid=1729340"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Lol same here
    loved that game till I got hl and halo.
    could have been a great game if only ppl used teamwork
    middle schoolers killed that...<!--QuoteEnd--></div><!--QuoteEEnd-->

    haha, yeah its our fault :P I got really big into the arena style maps though, dueling was great fun and there was just something about getting that midair disk kill that was so viscerally satisfying.
  • SkieSkie Skulk Progenitor Join Date: 2003-10-18 Member: 21766Members, NS2 Playtester, Reinforced - Shadow
    Yeah I'd hate to see Source netcode in this game. It completely ruined a HL2 mod called Dystopia for me.

    I couldn't favour more the "less prediction, more accuracy" perspective in things after all the pain Source has caused to me.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    I'm not sure why people think Quake 3 offers accuracy, in my mind it's really the opposite. If you shoot where a player is on your screen and you have lag, you will miss them (you have to lead your target based on your ping). In Half-Life, if you shoot where the player is on your screen and you have lag you will hit them, no leading necessary. The drawback is that sometimes, especially if you're really lagged, the player your hitting might feel like the shot was unfair ("Hey! I was around the corner!"). I'm not sure how the networking works in Source and haven't really played any Source games multi-player, so it might be different there.

    Our netcode is written from scratch. I originally integrated RakNet and OpenTNL (the Tribes networking library), but I had problems with them and didn't like the idea of using those black boxes for something as critical as the networking. My implementation borrows ideas from Quake 3 and Half Life, though for the things you guys are discussing it's more like HL than Q3A.
  • NurEinMenschNurEinMensch Join Date: 2003-02-26 Member: 14056Members, Constellation
    Yes Max, that's the way I want the netcode to be. Aim at stuff where it is on your own screen to score hits. And yes, those lag induced shots around the corner can feel stupid sometimes, but you just have to keep in mind that without the lag you would be just as dead, only you wouldn't have made it around the corner in the first place.
  • Invader_ScootInvader_Scoot Join Date: 2003-10-13 Member: 21669Members, Constellation, Reinforced - Shadow
    <!--quoteo(post=1729670:date=Sep 29 2009, 05:51 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Sep 29 2009, 05:51 PM) <a href="index.php?act=findpost&pid=1729670"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm not sure why people think Quake 3 offers accuracy, in my mind it's really the opposite. If you shoot where a player is on your screen and you have lag, you will miss them (you have to lead your target based on your ping). In Half-Life, if you shoot where the player is on your screen and you have lag you will hit them, no leading necessary. The drawback is that sometimes, especially if you're really lagged, the player your hitting might feel like the shot was unfair ("Hey! I was around the corner!"). I'm not sure how the networking works in Source and haven't really played any Source games multi-player, so it might be different there.

    Our netcode is written from scratch. I originally integrated RakNet and OpenTNL (the Tribes networking library), but I had problems with them and didn't like the idea of using those black boxes for something as critical as the networking. My implementation borrows ideas from Quake 3 and Half Life, though for the things you guys are discussing it's more like HL than Q3A.<!--QuoteEnd--></div><!--QuoteEEnd-->

    <b>Woohoo!</b> Definitely one of my primary wonders about this game answered perfectly. I never was the most fond of Source's netcode. Smart choices there Max, smart choices...
  • GregzenegairGregzenegair Join Date: 2009-06-26 Member: 67944Members
    You made the best choice, the HL/HL2 solution is the best and smoothness.
  • homicidehomicide Join Date: 2003-11-10 Member: 22451Members
    No one actually makes FPS games without prediction and lag compensation anymore.
  • MuYeahMuYeah Join Date: 2006-12-26 Member: 59261Members
    edited October 2009
    The only thing I'm worried about is hit registration. Most people I'm sure are fine with being killed around corners as long as it's from a high pinger, yeah its annoying but it doesnt happen too often and its more fair to them anyway. Although apparently hit registration is to do more with your ISP and routing to the server than netcode in the game.. lost packets etc. It's just lag compensation makes you think you hit and so on. It can get tremendously frustrating in NS1 when you hear the flak noise of bullets hitting an alien but no actual blood coming out.
  • BacillusBacillus Join Date: 2006-11-02 Member: 58241Members
    Quake 3 netcode is reliable. It takes a moment to adapt to the server latency, but after that it feels that nearly every shot regs. Of course it had downsides too, but the reliability feels extremely nice.
  • remiremi remedy [blu.knight] Join Date: 2003-11-18 Member: 23112Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester
    The reason people liked Quake's netcode so much wasn't actually due to the netcode, it was due to the tight feedback loop the player recieved. Every time one of your bullets successfully hit someone you got a "ping" noise to let you know. This made it so that, as you say Bacillus, it was very easy to adjust to the server latency. This might be something to consider for NS2 considering how important aiming is, and if it isn't in the main game, I bet it wouldn't be too hard to mod in.

    There are a lot of games that have done something similar, but I think Quake is the best example of a really tight feedback loop. In TF2, the Sniper's Huntsmann makes a "shtickk" noise when it hits a guy (even if the guy is across the map) which I think is one of the reasons I like using it so much. In Mario Kart 64, the same thing happened when another person ran over your banana or got hit by any other item of yours. You would hear them go "aieee" or whatever.

    Both Mario Kart and TF2 are on a different scale though, as the sound in Quake goes off like 40 times a second. With MK and TF2 it is intended more to be a notification of what is happening offscreen (hence the lower frequency), while in Quake it is intended to create the feedback loop.
Sign In or Register to comment.