Development Blog Update - Multi-threading dev video

FlayraFlayra Game Director, Unknown Worlds EntertainmentSan Francisco Join Date: 2002-01-22 Member: 3Posts: 6,821Super Administrators, NS2 Developer, Subnautica Developer admin
Please post comments on the topic Development Blog Update - Multi-threading dev video here
Charlie Cleveland
Game Director, Unknown Worlds Entertainment

Comments

  • derWalterderWalter Join Date: 2008-10-29 Member: 65323Posts: 634Members
    edited January 2012
    would have a server available with 2x12 cores @2,6ghz... but unfortunately i was told that the server needs a single core with 4-5ghz because of its lack of multithreading.

    so it got rejected by ensl.org :(



    btw.: for HalfLife there is a metamodplugin which bypasses the hardcoded 1000fps limit from the server
    and a friend of mine runs a cs server on an i5 with 3,4ghz at around 40 000 fps!
    Post edited by Unknown User on
  • KrizzenKrizzen Join Date: 2011-12-16 Member: 138181Posts: 100Members
    I really enjoy the more technical videos, and I think they should be even more technical. It's very interesting to peer into the thought process and design goals going into NS2.
  • bobthesobbobthesob Join Date: 2011-12-09 Member: 137195Posts: 40Members
    where is the Multi-threading dev video?
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    QUOTE (derWalter @ Jan 24 2012, 06:48 PM) »
    btw.: for HalfLife there is a metamodplugin which bypasses the hardcoded 1000fps limit from the server
    and a friend of mine runs a cs server on an i5 with 3,4ghz at around 40 000 fps!

    Counter-Strike doesn't have a lot going on in comparison to NS1\2, so while Lua does bugger up NS2's performance generally, it's gameplay-mechanics are still pretty heavy. If it was written in C\C++ like CS we certainly wouldn't be seeing performance anywhere near (a hypothetical) 40.000 FPS.

    As for the multi-threading, the video told most of it pretty much, everything that is easily threaded already is at this point (level-loading, physics, netcode, file-IO), the thing that is really holding the performance down is the game-logic (eg. the Lua-script), and multi-threading that in a conventional manner is neigh impossible. Well... strictly speaking not impossible, in fact pretty easy, keeping the cores buzy with USEFUL work however (eg. not waiting for mutex-locks all the time) demands very clever engineering-design.

    Multi-threading would be a preferred method, as something along the lines of LuaJIT with FFI might still not yield enough performance in terms of C interacting with Lua (which is a pending problem with Spark, and I've started to really run into it myself).
  • KrizzenKrizzen Join Date: 2011-12-16 Member: 138181Posts: 100Members
  • yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Posts: 372Members
    edited January 2012
    For this game,

    Im against using multi threading on online changes, server processes and some other sync based cloud operations which must be sync between server and clients. Because that makes line busy, much more lags, chokes, regs etc. That is important point.

    On the otherhand multi-threading, multi-core, multi-cpu, multi-gpu is highly needed for;
    - Physics (all collisions, kinematics, particullar eftects etc.)
    - Rendering and Lighting
    - Water effects (3D waving or some navier-stokes equation applications, shining, transparency)
    - Gas and some other effects
    - Other matrix based real-time effects or calculations (may be in infestation effects etc.)
    are the must.

    In conclusion multi-threading is only good if its results are not used in online send packages.

    Also this slogan can be used (with a good grammer) :D

    "NS2 is not only powerfull by its engine but also by its multi-treading."

    PS: I listen video but I didnt understand all cuz u speak too fast :D Forgive me if I miss something
    PS2: Please enable Physics-GPU, Thanx
    Post edited by Unknown User on
    Esenja Energy Management and Engineering, Mechanics, Electrics and Software LCC
    http:/www.esenja.com
  • juicejuice Join Date: 2003-01-28 Member: 12886Posts: 1,044Members, Constellation
    +1 for crowd-sourcing "MaxOS"
  • TinCanTinCan Join Date: 2006-12-11 Member: 59010Posts: 269Members
    I am not clear what happens to old school rigs like mine that only have one core. Will it just take longer/run slower or am I in the market for a new computer and didn't even realize it?
  • InertInert Join Date: 2008-02-03 Member: 63569Posts: 10Members
    edited January 2012
    When will we get to see the first build with multi threading enabled? (besides the loading screen)
    Post edited by Unknown User on
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    QUOTE (TinCan @ Jan 24 2012, 09:31 PM) »
    I am not clear what happens to old school rigs like mine that only have one core. Will it just take longer/run slower or am I in the market for a new computer and didn't even realize it?

    Single cores can do any kind of multi-threading (even slightly faster, due to the lack of overhead, eg. scheduling et cetera). Multi-threading however is very often less efficient, and makes up for that by throwing a lot of power (cores) into the process, thus allowing in the end a better performance than single-cores (but again, worse efficiency). Simply put, if single-threaded code is re-written\designed for multi-threading, chances are a single-core CPU will indeed experience worse performance (due to the less efficient design, which is capable of utilizing multiple cores, but that advantages does you no good with just 1 core).
  • yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Posts: 372Members
    edited January 2012
    QUOTE (TinCan @ Jan 24 2012, 09:31 PM) »
    I am not clear what happens to old school rigs like mine that only have one core. Will it just take longer/run slower or am I in the market for a new computer and didn't even realize it?


    Yes, multi-threading must be available for multi core, gpu systems. If there is one core, all effects should be off or should be low with users options.
    And multi-threading can be done with many single core cpu based PCs via internet, but it is not usefull for an online game like NS2,CS, HL games :D
    Post edited by Unknown User on
    Esenja Energy Management and Engineering, Mechanics, Electrics and Software LCC
    http:/www.esenja.com
  • yimmasabiyimmasabi Join Date: 2006-11-03 Member: 58318Posts: 372Members
    QUOTE (player @ Jan 24 2012, 10:38 PM) »
    Single cores can do any kind of multi-threading (even slightly faster, due to the lack of overhead, eg. scheduling et cetera). Multi-threading however is very often less efficient, and makes up for that by throwing a lot of power (cores) into the process, thus allowing in the end a better performance than single-cores (but again, worse efficiency). Simply put, if single-threaded code is re-written\designed for multi-threading, chances are a single-core CPU will indeed experience worse performance (due to the less efficient design, which is capable of utilizing multiple cores, but that advantages does you no good with just 1 core).


    U dont need to write whole code for multi threading. i.e. u can write for only water calculations. Engine of this game is really heavy for a single core in comparision with MW3, Skyrim, BF3 .
    Esenja Energy Management and Engineering, Mechanics, Electrics and Software LCC
    http:/www.esenja.com
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    The Lua-scripts are what is causing an immense load upon CPUs currently, that's what I was talking about as an option to multi-thread, and if it is truly designed around a multi-threading principle, single-cores will suffer. But if it can be done, it should be done, it is one of only a few options remaining. Though I can't really think of any game that actually has its core game-logic multi-threaded, it seems yet another problem too big really for an indie-team to surmount.
  • OnosFactoryOnosFactory New Zealand Join Date: 2008-07-16 Member: 64637Posts: 895Members
    edited January 2012
    Yus, at last.....NS2 OS...."A Gorge has bile bombed your memory, you get the green window of death.....please wait whilst a Fade hacks the S**t out of your last known stable install"

    PS: Please remember, while most of us have multi core CPUs, most of us don't have multicore GPUs....and I wouldn't expect that to change by time of release. Maybe one of those '1 year later out of the blue shock my socks off patches' for multi GPU, and just focus (pardon the game pun) on multi core CPUs in the mean time?
    Post edited by Unknown User on
    - 1991 is the Halcyon year of gaming -
     
    Best quote off locked NS2 forum ever:
     
    "The Rifle has a higher DPS than the Shotgun, whether you choose to believe it or not."
  • korvokorvo Join Date: 2009-11-19 Member: 69427Posts: 112Members, Squad Five Blue
    Didn't saw the video, but isn't Multithreading a de-facto standard and very ordinary practice in high end game programming, what's not even worth to mention?
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Posts: 941Members, Squad Five Blue, Reinforced - Shadow
    QUOTE (korvo @ Jan 25 2012, 07:34 PM) »
    Didn't saw the video, but isn't Multithreading a de-facto standard and very ordinary practice in high end game programming, what's not even worth to mention?

    It is standard for anything you want to run fast, but most people seem to think it's just a magic line of code "multithread this", while it is actually a very complex problem.
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    QUOTE (korvo @ Jan 25 2012, 06:34 PM) »
    Didn't saw the video, but isn't Multithreading a de-facto standard and very ordinary practice in high end game programming, what's not even worth to mention?

    It is for physics\file-IO\networking\sound and such, not for game-logic.
  • lunsluns Join Date: 2010-12-05 Member: 75502Posts: 804Members
    all i have to say about this, I shouldn't need to buy 3k pc just to be able to run/play this game. Even though I have an old pc, I run other games fairly well compared to ns2. And this game still did not post recommended spec requirements, if I missed it, some one post a link to those specs.

    now back on topic, "When will we get to see the first build with multi threading enabled?"
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    Would you be willing to give up NS2's modding-capability for a good performance in return?
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Posts: 8,199Forum Moderators, Constellation mod
    QUOTE (luns @ Jan 25 2012, 08:28 PM) »
    And this game still did not post recommended spec requirements,

    This is because they're not finalized yet. If there had been a requirements list for just a few versions ago, it would have been much higher than for build 19x.
  • ZeikkoZeikko Join Date: 2007-12-16 Member: 63179Posts: 585Members, Squad Five Blue, NS2 Map Tester
    QUOTE (luns @ Jan 25 2012, 10:28 PM) »
    all i have to say about this, I shouldn't need to buy 3k pc just to be able to run/play this game. Even though I have an old pc, I run other games fairly well compared to ns2. And this game still did not post recommended spec requirements, if I missed it, some one post a link to those specs.

    now back on topic, "When will we get to see the first build with multi threading enabled?"

    PC capable of running 60fps cost me 420 €. Not including peripherals, monitor, etc. 3k is quite an overstatement if you speak in euros or dollars.
  • derWalterderWalter Join Date: 2008-10-29 Member: 65323Posts: 634Members
    isnt there a middle way? lets say, compile lua to machine code?
    you have the slow debug mode with live lua and the gaming mode with compiled lua...
    so you can play with a little bit of stuttering to develop and debug
    and then play fast with compiled code...

  • TinCanTinCan Join Date: 2006-12-11 Member: 59010Posts: 269Members
    QUOTE (TinCan @ Jan 24 2012, 09:31 PM) »
    I am not clear what happens to old school rigs like mine that only have one core. Will it just take longer/run slower or am I in the market for a new computer and didn't even realize it?

    Further research suggests it will run as long as your CPU is capable of HTT [Hyper-Threading Technology] (Make sure it is enabled in your BIOS) but if your single core is not capable of HTT it will crash.
  • playerplayer Join Date: 2010-09-12 Member: 73982Posts: 1,677Members
    Multi-threaded applications don't crash single-cores, in fact we've had multi-threaded apps long before multi-cores became mainstream, they'll just context-switch now and then to mimic multi-tasking.
Sign In or Register to comment.