1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

When will multi-core CPU support be added?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Sethioz, Mar 26, 2014.

  1. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,084
    but see, each thread/core is doing a different part then the other in cases such as rendering video's, one core/thread would be doing the video, one would be doing the audio, while one would be encoding it, and another would be putting it all together in one file.

    and also, as for your faster thing, that's not because of more cores (for example, if you use vegas, it only uses 4 cores max, it will never use all 8 of your cores) it's because the cpu is architecturally better, for example, lets say, my cpu, compared to a core 2 quad Q9650, i could have them both at the EXACT same ghz, and mine would still be faster and better than it, why is that? because of architecture

    not only that, but your cpu isn't ALWAYS running at speed
     
    #21 logoster, Mar 27, 2014
    Last edited: Mar 27, 2014
  2. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    He didn't say that at all. He said you are getting 4.1GHz, which is true. 1 GHz = 10^9 Hz. Hz being the shorthand for hertz, a unit of frequency. When applied to CPU clocks the hertz rating refers to how many times per second the clock goes through a full cycle of rising and falling edge. On a 4.1GHz CPU the clock signal rises and falls 4.1*10^9 times per second, it isn't going to change by adding more cores....


    We are using multi core CPU's in order to do multiple things at once.
    A computer program consists of a series of instructions. They can only handle 1 instruction at a time. With 2 cores however you gain instructions so that you can then tell the other core to start processing another bunch of instructions so you can effectively do 2 instructions at a time. 8 cores = 8 instructions at a time.

    1 set of instructions cannot be split up across multiple cores. You have to write a program specifically to take advantage of this which you seem to think is incredibly simple when it isn't. The way BeamNG already handles this is simply the best we can do within the limitations of current CPU technology, ie 1 vehicle per core. If your machine is not splitting the vehicles onto their own cores then there is something wrong with your system, it functions fine on everyone elses. Splitting 1 vehicle up to run across 13 cores or something is a highly technical challenge and simply not going to happen, you end up with race conditions and cross thread dependancies threatening to desynchronise the entire system, keeping these in check may even reduce the speed over having 1 thread for the entire vehicle, when something lags the first solution is not to throw more threads at it and expect it to work.
    BeamNG is planned to get OpenCL support in future (using the GPU to calculate physics), its also supposed to be getting vehicle sleeping (pausing the physics of a stationary vehicle beyond a certain range) and as alpha grade software is not far enough into development for aggressive optimisations but eventually it will.


    Next car game, that damage is actually precalculated. Remember the 3d era GTA games (so GTA3 through to vice city stories) how you would hit an object and the bumper would fall off as a precalculated object to come off, this is what next car game does, it just does it with many more parts. If you watch slow mo videos for NCG you can even see where the car immediately switches between clean and damaged versions in 1 frame. The CPU load required for it, negligibly more than for any other driving game. BeamNG however has to calculate an entire physics skeleton in realtime, very intensive.

    - - - Updated - - -

    Perfect example for this.
    Single threaded benchmark score for my 3.4ghz AMD Athlon triple core on one test is around the 2900 mark. My 1.8ghz intel core i3 dual core (low voltage ultrabook model, ivy bridge) on the same test scores just over 2200. Achieves approximately 3/4 of the score from approx 1/2 the clock speed.
     
  3. Sethioz

    Sethioz
    Expand Collapse

    Joined:
    Mar 10, 2014
    Messages:
    45
    It's going offtopic, but yes i know how multicore CPUs work, however you're bit wrong. Well optimized program will split the load perfectly. If there is just ONE job for CPU, like "convert video from 1080p to 720p" then program would split the process into 8 and assign task to each core and at end, put the bits together.

    If what you say would be true, then when rendering a video, some of my CPU cores would get less usage and some more, but they're all at 99-100% at all times.
     
  4. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    You have never tried writing a multi threaded application then...
     
  5. Sethioz

    Sethioz
    Expand Collapse

    Joined:
    Mar 10, 2014
    Messages:
    45

    Yeah using GPU would be nice and once again i repeat, i KNOW that NCG is not as real as BeamNG in damage calculation, but it sure looks real. If possible BeamNG should have that lower damage calculation mode as i mentioned. would be great.

    As about comparing Intel to AMD, you should know that Intel's dual core is equal to AMDs quad core, because Intel uses patented multi-threading, 1 core of Intel, can do 2 threads at same time, so those 6-core i7s are equal to 12-core CPUs actually, while AMD uses single-threading, so 8-core AMD does 8 threads, while 6-core Intel does 12-threads. You can't really compare single core performance between intel and amd.
    Unless that i3 you have is single threaded CPU, but as far as i know they're all multi-threaded.
     
  6. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    Intel hyperthreading, which if you read my posts I have already referenced and stated why it *is not* equivelant to 2 cores. And yes you can compare single core performance because single core performance is supposed to refer to single threads which would not be gaining any performance boost from hyperthreading (which can in fact *cripple* CPU performance), but you know all about SMT right?
     
  7. programmerJeff

    programmerJeff
    Expand Collapse

    Joined:
    Mar 24, 2014
    Messages:
    3
    The problem is the Torque engine itself lacks multithreading/multiprocessing. It would take a lot to rewrite a lot of the infrustructure behind it. Torque rests on an old technology from TGE / TGEA that was made years ago, where multithreading didn't matter too much. besides, there is still nothing wrong with single threaded applications, however the physics I do have to say should be written on a seperate thread(s) and apply callbacks to it.

    Another thing that I hope the team puts in is the new Direct3D9 refactoring, as some people were able to get double performance out of torque with it.

    I'm not bashing Torque3D in any way, its my favorite game engine and I've done stuff with Torque for years. Just pointing out as to why it don't run on multiple cores. If the team wants to tackle this, it would be amazing though.

    Also my first post on the forums :)

    Jeff H
     
  8. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,084
    ..., beamng already supports multi-core cpu's correctly, if the game isn't using the core's correctly, then something is wrong, ON YOUR END, why is that so hard for you people to understand
     
  9. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    BeamNG doesn't utilise Torques native physics, its instead implemented as a 3rd party multithreaded library, the early demo's were performed on cryengine for example. Torque is pretty much only used as a bit of boilerplate code with a glorified renderer.


    TDev and Estama (the 2 programmers for BeamNG) are now contributing back to the rest of Torque3d which can only be a good thing. I think it was OpenGL they were planning to work on, be interesting to see what framerate difference that makes (for those who are GPU bottlenecked)
     
  10. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    Would it be possible to Run each car on a few Cuda cores or something similar so that the GPU does most of the work??

    Or perhaps Physx would help?
     
  11. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    Search button. OpenCL. Mentioned in this thread already.

    CUDA is NVidia's proprietary alternative to OpenCL, both NVidia and AMD cards have OpenCL support. It is a planned feature for BeamNG in the future (as referenced on the homepage and wiki too)
     
  12. programmerJeff

    programmerJeff
    Expand Collapse

    Joined:
    Mar 24, 2014
    Messages:
    3
    I kind of figured they had threading on their physics, my point is what about the TorqueScript virtual machine and the LUA interpreter, as well as the renderer, particle updates, ect all runs on 1 thread. The TS VM is one of the slowest VM's around.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice