More threads support

ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
Hi, as an addition to your continual love/support for increasing performance

I was wondering (while this won't help everyones problem) if we can enable the game to use more threads(cores) than what it currently does

I'm not sure if this is being worked on, or difficult to implement; but I've played on an engine where I could manually (even though it apparently doesn't work properly, but did work) force extra threads. And the performance gains were phenomenal!

So let me know if it's possible or being worked on, or if it's not possible and I should go cry in some corner! :P What does everyone else think?

Comments

  • JoseppeJoseppe Join Date: 2012-01-21 Member: 141497Members
    edited April 2013
    i dont know the spark engine internals, but it´s really not easy. If it would be easy they have done it already.
    Multithreading is not so easy, because you need to implement the code to run parallel. Its NOT easy to get all
    cores processing at same time without waiting for the result on another core to proceed processing.

    BTW:
    * maybe the framework of the engine you talked about is developed for parallel processing in mind in its core,
    but (i dont know) spark isn´t (in it´s core framework).
    * BUT: the devs are doing something like this... in B423 they increased (implemented) multicore processing
    on the "compiling shaders" what you see updating after each Patch release (as a part of the whole processing process).
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    As Joseppe said, it's not as easy to develop multithreading as you think it is. It definitely isn't just something that could simply be added, because hey why not ;)

    Also in before more technical explanations :P
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    Well, I have no idea what either of you just said. BUT! my hopes remain high, because this is one of my favorite games.. slapped by just one thing :(
  • DC_DarklingDC_Darkling Join Date: 2003-07-10 Member: 18068Members, Constellation, Squad Five Blue, Squad Five Silver
    edited April 2013
    the problem, so far I understand, lies in the following. (correct me if I am wrong)

    If you want a working building you need:
    * power
    * no infestation so you can place it.
    * res
    * room
    * (possible upgrades)
    * health & armor on the building
    * marines or macs to build

    Lets grab infestation.. So be sure that there is or is not infestation, you need to know what the infestation is doing.
    * connected to cyst?
    * cyst alive?
    * hive alive?
    * growing from cyst or retracting after cyst death?


    The game MUST know if stuff X happens, so it knows if it can let you do stuff Y.
    SO it must know if there is infestation in your way so it knows if you can drop a structure or not.
    The game has many many many many many many many MANY more of such things. It is all connected.
    From what I understood you can much more easy multithread stuff which isnt that connected.

    For example.. a cyst will die with or without it showing on your screen. So they can put the logics (cyst) and the graphics in different threads.
    Yes you want to know if a cyst dies, but the game doesnt "need" to show you in order for the event to happen.
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    You lost me at, "the"

    Anyway like i said in my initial post all of this is beyond me, just suggesting it because in my logical world where everything works this would make performance awesome (for everyone on quads and what not)
  • SquishpokePOOPFACESquishpokePOOPFACE -21,248 posts (ignore below) Join Date: 2012-10-31 Member: 165262Members, Reinforced - Shadow
    Multithreading is great for compiling/loading, I guess. But not so much for real-time stuff.
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    Squishpoke wrote: »
    Multithreading is great for compiling/loading, I guess. But not so much for real-time stuff.

    I don't understand, setting the source engine to use 8 threads instead of 2, changes my framerate from 300~+ stable to 999 capped

    But there isn't as much going on in that game I guess?

    Anyway after playing the NSL version of each map, I seem to be getting desired performance.. and those maps are much better light wise than the official ones since you can see everything like fullbright except they are duller lights
  • DC_DarklingDC_Darkling Join Date: 2003-07-10 Member: 18068Members, Constellation, Squad Five Blue, Squad Five Silver
    edited April 2013
    Ok... not easy enought? lets see....

    Multi thread: you eat and blink your eyes. You did 2 things at once. You can actually do these 2 things seperate. Thats because they are completely not related.

    Non Multi thread: You are running fast & breathing.. You also do 2 things. But you can not split these apart.. you MUST breathe. Else you can not keep up running.


    So multi you can split a task.
    Non multi tasks can not be split.

    NS2 has a lot of the non multi ones.
  • IronsoulIronsoul Join Date: 2011-03-12 Member: 86048Members
    The Source Engine is a AAA engine developed over a large amount of years (over 12 now... TWELVE YEARS) by a large amount of people with large amounts of computers.

    The Spark Engine (What NS2 runs on) is a AAA engine developed over not so large amount of time (Less than 5 years) by a not so large amount of people (less than 5 people?).

    Let's not forget the Source Engine (that game engine you claim you get 999fps in) has HORRENDOUS framerate issues when Half Life 2 originally came out. I'm talking struggling to get 40 on high end machines.

    Another thing which you must understand, is that NS2 itself is written in a programming language called Lua. Lua, does not support Multi Threading... it supports a thing called Coroutines, but that's a method of starting and stopping different bits of computation, rather than running multiple bits of computation at the same time.

    A game written in a language that does not support multi threading... means it's going to be difficult to multi thread things.
  • ezekelezekel Join Date: 2012-11-29 Member: 173589Members, NS2 Map Tester
    Ironsoul wrote: »
    The Source Engine is a AAA engine developed over a large amount of years (over 12 now... TWELVE YEARS) by a large amount of people with large amounts of computers.

    The Spark Engine (What NS2 runs on) is a AAA engine developed over not so large amount of time (Less than 5 years) by a not so large amount of people (less than 5 people?).

    Let's not forget the Source Engine (that game engine you claim you get 999fps in) has HORRENDOUS framerate issues when Half Life 2 originally came out. I'm talking struggling to get 40 on high end machines.

    Another thing which you must understand, is that NS2 itself is written in a programming language called Lua. Lua, does not support Multi Threading... it supports a thing called Coroutines, but that's a method of starting and stopping different bits of computation, rather than running multiple bits of computation at the same time.

    A game written in a language that does not support multi threading... means it's going to be difficult to multi thread things.

    science!
Sign In or Register to comment.