NS2 Netcode

douchebagatrondouchebagatron Custom member titleMembers, Constellation, Reinforced - Shadow Join Date: 2003-12-20 Member: 24581Posts: 3,509
info?
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.
the artist formerly known as 6john
and
the artist currently known as d*uchebagatron
«13

Comments

  • remiremi remedy [blu.knight] Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester Join Date: 2003-11-18 Member: 23112Posts: 2,689 admin
    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...
    [ Rek | Reklys | remedy | remi.D | blu.knight | Psyke | Sky ]
    I have way too many names.
  • homicidehomicide Members Join Date: 2003-11-10 Member: 22451Posts: 581
    Screenshot of NS2 netcode:

    image
    CAL-ns|Austin
    CALeague - Natural Selection Division Admin

    image Co :: xHomicide
    Creator of ns_bhop (best ns map ever made), ns_duel, initial cal-ns plugin, nslearn.org website,
    and Capture Point (a 2 week source mod that a couple dozen people downloaded)

    http://austinlawrence.no-ip.org/ons/
  • JAmazonJAmazon Members Join Date: 2009-02-21 Member: 66503Posts: 712
    ^^^ I always knew max would have something to do with the matrix...now how about skynet :O
  • FaskaliaFaskalia Wechsellichtzeichenanlage Members, Constellation Join Date: 2004-09-12 Member: 31651Posts: 2,405
    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!
    QUOTE(TychoCelchuuu @ Jul 30 2008, 03:51 PM) »
    The only similarity to Ground Control is that instead of arriving from a building, your dudes arrive from the sky. Why does that merit a meh?
    QUOTE(puzl @ Apr 20 2007, 04:38 PM) »
    You can mince it anyway you like, but if a government can take it a way then it doesn't really matter if it is a right or a privilege, does it?
  • MuYeahMuYeah Members Join Date: 2006-12-26 Member: 59261Posts: 610
    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 Members, NS2 Playtester, Reinforced - Shadow, Subnautica Playtester Join Date: 2008-02-05 Member: 63584Posts: 365
    QUOTE (Psyke @ Sep 27 2009, 03:40 AM) »
    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...


    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 Members Join Date: 2006-11-04 Member: 58338Posts: 1,043
    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.
    [Fanarama] you're like kryptonite to electronics, sherpa
  • BacillusBacillus Members Join Date: 2006-11-02 Member: 58241Posts: 2,774 Advanced user
    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 Members Join Date: 2008-09-28 Member: 65094Posts: 137
    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 Members Join Date: 2009-02-21 Member: 66503Posts: 712
    tribes 2 = my middle school education O_o
  • OroxOrox Members, Constellation Join Date: 2005-01-07 Member: 33139Posts: 33
    I can support everything that is NOT HL netcode. So much frustration to be killed in a corner.
  • PhiXXPhiXX Members Join Date: 2008-10-22 Member: 65274Posts: 236 Advanced user
    QUOTE (Orox @ Sep 27 2009, 09:12 PM) »
    I can support everything that is NOT HL netcode. So much frustration to be killed in a corner.

    u mean around a corner :D yeah I hate it so much...
  • OpprobriousOpprobrious Members Join Date: 2008-11-17 Member: 65483Posts: 118
    QUOTE (sherpa @ Sep 27 2009, 06:14 AM) »
    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).<br /><br />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.


    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.
    Invidious | <Gud> server admin | evolvens.com | Opinions expressed here are not necessarily the official positions of evolvens.com
  • noncomposmentisnoncomposmentis Members Join Date: 2004-11-13 Member: 32773Posts: 342
    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. The problem with HL was that you were at the mercy of someone else's connection. The only variable should be your connection.
    The care of human life and happiness, and not their destruction, is the first and only object of good government.
    - Thomas Jefferson
  • spellman23spellman23 NS1 Theorycraft Expert Members Join Date: 2007-05-17 Member: 60920Posts: 3,365
    QUOTE (MuYeah @ Sep 27 2009, 03:43 AM) »
    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.


    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.
    helping bring perspective and learning since the olde days

    QUOTE
    <jenny> What's the plural of 'Onos'?
    <Mexican> For a while, I thought it was 'Oh ######'!


    Vote on your Ideas/Suggestions!
    http://www.unknownworlds.com/forums/index....howtopic=125347
  • poonzer69poonzer69 Members Join Date: 2009-09-27 Member: 68889Posts: 30
  • SopsSops Members, Constellation Join Date: 2003-07-03 Member: 17894Posts: 1,490 Advanced user
    It is an access code that drops a net on people.
  • poonzer69poonzer69 Members Join Date: 2009-09-27 Member: 68889Posts: 30
    QUOTE (Sops @ Sep 28 2009, 03:46 AM) »
    It is an access code that drops a net on people.


    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 Members, Constellation, Squad Five Blue Join Date: 2003-04-26 Member: 15855Posts: 605
    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 Members Join Date: 2008-09-28 Member: 65094Posts: 137
    QUOTE (JAmazon @ Sep 27 2009, 12:38 PM) »
    tribes 2 = my middle school education O_o

    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 Members Join Date: 2009-02-21 Member: 66503Posts: 712
    QUOTE (ghost in the shell @ Sep 28 2009, 06:25 PM) »
    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...


    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 Members, NS2 Playtester, Reinforced - Shadow Join Date: 2003-10-18 Member: 21766Posts: 656
    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 Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer Join Date: 2002-03-15 Member: 318Posts: 1,737 admin
    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.
    Max McGuire
    Technical Director, Unknown Worlds Entertainment
    bs_
  • NurEinMenschNurEinMensch Members, Constellation Join Date: 2003-02-26 Member: 14056Posts: 1,352
    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.
    This is the kind of thing that goes on behind close doors on normal game releases, where they are optimizing it right up until the end. You guys are just getting to play with a version of the game that normally only the developers see.

    --Cory
  • Invader_ScootInvader_Scoot Members, Constellation, Reinforced - Shadow Join Date: 2003-10-13 Member: 21669Posts: 1,589 Fully active user
    QUOTE (Max @ Sep 29 2009, 05:51 PM) »
    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.


    Woohoo! 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 Members Join Date: 2009-06-26 Member: 67944Posts: 84
    You made the best choice, the HL/HL2 solution is the best and smoothness.
    Sorry for my english, french here...
  • homicidehomicide Members Join Date: 2003-11-10 Member: 22451Posts: 581
    No one actually makes FPS games without prediction and lag compensation anymore.
    CAL-ns|Austin
    CALeague - Natural Selection Division Admin

    image Co :: xHomicide
    Creator of ns_bhop (best ns map ever made), ns_duel, initial cal-ns plugin, nslearn.org website,
    and Capture Point (a 2 week source mod that a couple dozen people downloaded)

    http://austinlawrence.no-ip.org/ons/
  • MuYeahMuYeah Members Join Date: 2006-12-26 Member: 59261Posts: 610
    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 Members Join Date: 2006-11-02 Member: 58241Posts: 2,774 Advanced user
    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] Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester Join Date: 2003-11-18 Member: 23112Posts: 2,689 admin
    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.
    [ Rek | Reklys | remedy | remi.D | blu.knight | Psyke | Sky ]
    I have way too many names.
Sign In or Register to comment.