Natural Selection 2 News Update - On NS2 performance

FlayraFlayra Game Director, Unknown Worlds EntertainmentSan Francisco Join Date: 2002-01-22 Member: 3Posts: 6,828Super Administrators, NS2 Developer, Subnautica Developer admin
Please post comments on the topic Natural Selection 2 News Update - On NS2 performance here
Charlie Cleveland
Game Director, Unknown Worlds Entertainment
«134

Comments

  • DJPenguinDJPenguin Useless Join Date: 2003-07-29 Member: 18538Posts: 945Members
    not much to say really. those with even the smallest sense of rationale knows you guys will pull through.
    Philadelphia is a PvP server
  • internetexplorerinternetexplorer Join Date: 2011-10-13 Member: 127255Posts: 1,369Members
    It's a pretty good explanation of the computing concepts at work, but the pessimist in me says nobody who complains really loudly will read that far...
  • peregrinusperegrinus Join Date: 2010-07-16 Member: 72445Posts: 2,426Members
    Really good read. You made the right decision to hire NS2HD!
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    Good to know they're going to work on the fundamentals. The polishing of the Lua-scripts will yield speed-ups, but I gather it won't be sufficient all on its own. And I'm still quavering with regards to the figures NS2HD is qouting, for servers (as of the latest build), I'm inclined to say we need a 500-1000% speed-up.

    but the pessimist in me says people will be satisfied with a 4-5GHz 30-tick server.
  • internetexplorerinternetexplorer Join Date: 2011-10-13 Member: 127255Posts: 1,369Members
    You know what I'd like to read about? What the server framerate actually means. CSS, TF2, Quake etc would be unplayable with a 30 tickrate. How does their stuff relate to NS2's rates?
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    CS:S and TF2 can run without problems on 60 ticks (in fact they do by default). L4D goes as low as 30 (though not as fast-paced a game of course). Judging the animations and hit-reg on NS2-servers, I'm thinking they should be closer to 60 than 30. I guess I have the competitive-scene in the back my head when contemplating these issues, and I feel like 60-100 should be the target.
  • rebirthrebirth Join Date: 2007-09-23 Member: 62416Posts: 372Members
    edited April 2012
    Personally i couldn't be more happy about Spark's performance, i like how CPU intensive it is for a change.
    Let's assume that Spark and as such NS2 is here to stay for a while.
    And CPU's are usually there to stay and have an higher lifetime in terms of "performance" then GPU's have.

    So a PC game being mostly CPU limited is always an good thing to me, means that down the line many people will be able to play on "average computers" as CPU speeds/core numbers keep increasing at high rates. So future PC's will have an easier time running this baby without having to depend too much on an "high end gaming GPU" being inside that same PC.

    Kinda reminds me of Raytracing in some ways and why it would be a great thing to use for videogames.

    I also like how the NS2 seems to outsource a lot of logic to the server CPU, this is akin to the general trend of cloud computing that outsources a lot of logic/workload to the server side to remove some strain on the client side calculations. But i don't have any deep programming experience so i'm not sure how stupid/wrong the correlations and observations i'm making here actually are ;)
    Post edited by Unknown User on
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    Except that NS2 demands vertical-performance (single threaded, high clock-speed), while CPUs are moving towards horizontal-performance (as you pointed out, an increase of cores). CPUs will still remain as fast or become faster in single-threaded work with each passing generation, but the focus is shifting away from it.
  • XariusXarius Join Date: 2003-12-21 Member: 24630Posts: 2,186Members
    Good article, very understandable for people with absolutely no coding background, and great to hear that big improvements are on the way.
    Steamname: Unkn0wn
  • rebirthrebirth Join Date: 2007-09-23 Member: 62416Posts: 372Members
    edited April 2012
    QUOTE (player @ Apr 14 2012, 11:54 PM) »
    Except that NS2 demands vertical-performance (single threaded, high clock-speed), while CPUs are moving towards horizontal-performance (as you pointed out, an increase of cores). CPUs will still remain as fast or become faster in single-threaded work with each passing generation, but the focus is shifting away from it.


    They are still getting faster overall, you can't ignore that "clock speeds" between architectures also don't translate seamlessly in terms of performance.
    Newer architectures usually work more efficient/performant with slower clockspeeds compared to older architectures at the same speeds. Regardless of number of cores.
    And as such a CPU limited game usually tends to be one with more "lasting appeal".

    Most office and budget PC's cut down on the GPU as the GPU is an piece of hardware that iterates more often compared to the CPU. But performance jumps between GPU generations are usually not the drastic compared to performance jumps with new CPU generations. Anyway, it's great how many sentences we can write and end up basicly arguing for the same thing ;)
    Post edited by Unknown User on
  • JibrailJibrail Join Date: 2009-04-16 Member: 67200Posts: 866Members
    Great article and very well written I enjoyed that thanks Hugh.

    On another note I am asking this because I have no background in programming but say if I wanted to create a game using this engine and LUA, and the game logic isnt as complex as the one in NS2 ( I am talking about the whole layer so including UI, how structures work, weapons etc ) lets say something like Counter Strike for argument's sake will the client/server run smoother if it has less lines of code giving that it is allso well optimized? and will it be a huge difference or very small and barely noticeable?
  • DeadzoneDeadzone Join Date: 2003-07-03 Member: 17911Posts: 933Members, Reinforced - Shadow
    Great article, Hugh! I really enjoyed reading it. It explained a lot in simple terms, which I appreciate since I'm not a coder.

    It's also great to hear you've got the main culprit of the performance issues pinned down! I'm sure you'll figure a way to make it work before summer's over.
    <--- Tastes Like Skittles IGN
    image
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Posts: 1,397Members
    image

    Just trolling :P
    In-game name: Wilson

    My Crosshair Pack: LINK
  • croncron Join Date: 2010-06-21 Member: 72122Posts: 142Members
    I wonder how much work it would be to migrate parts of the game, that are rock solid decided and not subject to change, to C++ code. You already have the Lua scripts communicating with C++ code through some interface; in every program there are those functions that are called much more often than others and eat up much more time, I imagine that is very much so the case with game logic and I wonder how much of an impact it would have to migrate just the top 1% hungry functions to precompiled code.
    As I remember the Luajit approach did not work out and I see how migrating some parts of the game code to another language is neither a clean solution nor does it help the ease of modding that you want to pursue, but if there is no other way to squeeze out performance, would that be possible?
    Migrating just the most called functions like line of sight-tracing or the pathing of AI entities to precompiled code sounds like last measure method with a huge potential.

    Apart from that, which networking model is NS2 using? I have recently seen an interesting talk from one of the programmers at Bungie about their networking with a priority system based on analyzed player stats where many entities would not even be considered for a refresh for several seconds. I imagine such a priority system would be possible to write pre-compiled as modders really don't need to touch that (assuming the server is written entirely in Lua atm).
    "This relentless restlessness"
  • Super Angus BoySuper Angus Boy Join Date: 2012-04-01 Member: 149771Posts: 16Members
    Great read, very informative :)
    Calling me Super Anus Boy is both funny and original. You're so clever. Do it all the time.
  • sickboysickboy Join Date: 2003-09-13 Member: 20804Posts: 209Members, Constellation
    Very nice read, thanks for writing it up! Now lets just hope the constant complainers will shut their traps and be patient.
  • WheeeeWheeee Join Date: 2003-02-18 Member: 13713Posts: 4,160Members, Reinforced - Shadow
    edited April 2012
    dealing with the server issues would solve 50% of the client issues. The game is fun enough that i can deal with frame dips in combat. what kills the experience is those godawful 2-3 second stutters where the server decides to ###### itself because it's overloaded.
    Post edited by Unknown User on
    QUOTE (EEK)
    Don't assume that because I said something it means I actually was thinking that the core of the sun was going to be replaced with hot dogs.
  • JowJow Join Date: 2011-06-23 Member: 106032Posts: 81Members
    edited April 2012
    QUOTE (player @ Apr 14 2012, 06:34 PM) »
    CS:S and TF2 can run without problems on 60 ticks (in fact they do by default). L4D goes as low as 30 (though not as fast-paced a game of course). Judging the animations and hit-reg on NS2-servers, I'm thinking they should be closer to 60 than 30. I guess I have the competitive-scene in the back my head when contemplating these issues, and I feel like 60-100 should be the target.


    Quake 3 was a 30 tick game and Quake Live only uses 40, I've always wondered why Source games ran at such high tickrates to feel good for hitreg.
    Post edited by Unknown User on
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    QUOTE
    In fact, it is perfectly accurate to call Natural Selection 2 a mod of the Spark engine. Spark is the in-house engine developed as the brain-child of Max 'm4x0r' McGuire. Spark is written in C++, a fast low level language. NS2 sits on top of Spark, written entirely in easily accessible Lua. It is possible to mess with the game without ever having to deal with the C++ engine.


    What about the dot functions (e.g. Alien.GetFrictionForce), are those written in lua ? I'm a bit confused because methods are normally called with colon in lua (Alien:GetFrictionForce).

    I'd love to have more technical informations about the lua vm optimization, sounds like an interesting subject.
  • ObraxisObraxis Subnautica Animator, Co-Lead NS2 CDT Join Date: 2004-07-24 Member: 30071Posts: 1,873Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts admin
    Being CPU bound is better than being GPU bound. They know where the problems are, and are working to speed things up dramatically. They're long-term plans but like a fine wine, the product will be fantastic.

    If NS2 fails, follow my Nuke From Orbit Guide.

  • MuYeahMuYeah Join Date: 2006-12-26 Member: 59261Posts: 610Members
    That was interesting. Thanks for writing it.
  • ZehtukaZehtuka Join Date: 2010-07-26 Member: 72853Posts: 9Members
    I don't understand why everybody is getting so mad at the performance. Yes it is not that amazing right now but considering the quality of their programmers this will be resolved before launch. Like Hugh said they're using the beta as an instant-feedback tool to find out what works and what doesn't. When they've found the "sweet spot" with the gameplay they can optimize it to infinity, it is not unrealistic to expect a 200 to 300% performance increase as we draw closer to launch.
  • Dragon-GuardDragon-Guard Join Date: 2011-07-25 Member: 112159Posts: 132Members
    Nice read!

    offtopic but this line instantly made me think of a piece of art.

    "...and explains where we are, how we got here, and where we're going."


    Paul Gauguin - Where Do We Come From? What Are We? Where Are We Going?
  • croncron Join Date: 2010-06-21 Member: 72122Posts: 142Members
    QUOTE (Dragon-Guard @ Apr 15 2012, 01:27 PM) »
    Paul Gauguin - Where Do We Come From? What Are We? Where Are We Going?


    Let's just hope UWE don't suddenly have enough of all of us and run away to Polynesia with no money but lots of talent.
    "This relentless restlessness"
  • MJR_1MJR_1 Join Date: 2012-04-15 Member: 150486Posts: 1Members
    Hello, this is my first post, but I had to write it because I am really concerned about the whole LUA thing.

    I am a big fan of NS1 and preordered NS2 already back in 2009 (for me and a friend) and want NS2 to succeed.

    In my opinion you should consider extrem drastic actions like getting rid of LUA/FLash/etc almost entirely (except for some perfomance uncritical parts)
    and rewirtting the code in C++.

    I know that this is a lot of work and would also make modding very hard, but you should always keep in mind that the shooter part of your game is only fun if it is fluent and it makes up for a big part of the gameplay.

    98% of all mods will be something like siege maps for NS1 that dont need a lot of LUA scripting to make them.

    If the server start lagging with 16 player and you dont get a fluent FPS experience with a typical high end pc, then the rest of the game does not matter any more.

    Short Version:
    Modding capabilities should always come second to the perfomance of NS2


    (excuse my bad english :>)






  • w0dk4w0dk4 Join Date: 2008-04-22 Member: 64129Posts: 351Members, Constellation, Reinforced - Shadow
    QUOTE (MJR_1 @ Apr 15 2012, 01:03 PM) »
    Hello, this is my first post, but I had to write it because I am really concerned about the whole LUA thing.

    I am a big fan of NS1 and preordered NS2 already back in 2009 (for me and a friend) and want NS2 to succeed.

    In my opinion you should consider extrem drastic actions like getting rid of LUA/FLash/etc almost entirely (except for some perfomance uncritical parts)
    and rewirtting the code in C++.

    I know that this is a lot of work and would also make modding very hard, but you should always keep in mind that the shooter part of your game is only fun if it is fluent and it makes up for a big part of the gameplay.

    98% of all mods will be something like siege maps for NS1 that dont need a lot of LUA scripting to make them.

    If the server start lagging with 16 player and you dont get a fluent FPS experience with a typical high end pc, then the rest of the game does not matter any more.

    Short Version:
    Modding capabilities should always come second to the perfomance of NS2


    (excuse my bad english :>)


    Kinda agree here. This:

    QUOTE
    That is what Max is spending much of his time on right now. In fact, a programmer who shall not be name believes that the new 'Lua Virtual Machine' could cut Lua CPU usage in NS2 by 50%. This would yield a performance improvement of 25% at least, and likely more. Add that to the 'Hydra' style Lua optimisation and the improvement numbers start to look very, very attractive.


    So, at best, this will result in a 25% performance increase (btw. I thought this was already done).
    Of course this increases FPS and playability, but i.e. on the server side, at least a 100% perf. increase is needed (which is your goal for release apparently).

    I hope you can pull it through but I also urge to think about more drastic actions. And the argument that being CPU bound is a good thing must be the joke of the week. CPU being the bottleneck is the worst thing that can happen to your game, since players can not "fix" it by lowering the graphics settings (especially important for competitive scene).
    ArmoryChamber.net [ConstellationSlots/AdvancedBalance]
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Posts: 1,731Members
    I think chunks of code have already been moved to C++. C.f. my previous question :

    QUOTE
    What about the dot functions (e.g. Alien.GetFrictionForce), are those written in lua ? I'm a bit confused because methods are normally called with colon in lua (Alien:GetFrictionForce).


    Rewriting everything would probably take way too long. But I agree that performance is more important that moddability; if the game don't run well nobody will want to mod it anyway.
  • JibrailJibrail Join Date: 2009-04-16 Member: 67200Posts: 866Members
    if they decide to go with C++ may that be everything or just some parts would that mean they have to rewrite a certain part of the engine to call code from c++ instead of LUA? or can they just start doing it?

    allso can someone with knowledge of programming answear my question on the first page post nr: 12
  • BacillusBacillus Join Date: 2006-11-02 Member: 58241Posts: 2,714Members
    edited April 2012
    QUOTE (Obraxis @ Apr 15 2012, 10:46 AM) »
    Being CPU bound is better than being GPU bound.

    Why? Unless you're going to provide some arguments to back you up, I'm going with w0dk4's argument:

    QUOTE (w0dk4 @ Apr 15 2012, 01:10 PM) »
    CPU being the bottleneck is the worst thing that can happen to your game, since players can not "fix" it by lowering the graphics settings.


    ---

    If there are problems, let's be honest about them and see what can be done about them rather than trying to see a silver lining in places where it doesn't exist.
    Post edited by Unknown User on
  • zeepzeep Join Date: 2002-11-01 Member: 3367Posts: 254Members
    Okay okay, i shall bug you no more with performance related posts.
    You've explained it to the bone.
«134
Sign In or Register to comment.