GPGPU(OpenCL/CUDA)+Multithreading Support

  • Rawrkanos
    2nd Dec 2012 Member 2 Permalink

    Both of these are in dire need. I suggest OpenCL because it operates on both classes of graphics card whereas CUDA is NVidia specific. Multithreading is also needed but only in the case of OpenCL being impossible.

    The fact that adding it to the Toy at this stage would require extensive re-writing of the code only means that the code should be re-written from the ground up, not that it is complex or impossible. Start from scratch and you'll make something better than if you try to adapt the changes into an old Frankenstein's Monster of code.

  • mniip
    2nd Dec 2012 Developer 0 Permalink
    I believe that's not really possible, what could OpenCL/GL improve? Only graphics there are particles and glowing blobs, they can't be speeded up.

    Multithreading? You will have to synchronise threads really often, and that will give no performance increase at all.

    Also, rewriting code from scratch will ruin thousands of saves
  • Rawrkanos
    2nd Dec 2012 Member 0 Permalink

    OpenCL is for computing upon the more limited architexture. Implimented properly, it can do physics and heat-simulation and the like. In other words, it can handle much of the computing required, most likely at a much faster speed. It's very good for some tasks, which is why the bitcoin-mining world latched onto it for so long.

  • mniip
    2nd Dec 2012 Developer 0 Permalink
    heat simulation works on a proprietary engine which was optimised in all possible ways, the most lagging part is update functions, which are called tons of times, you can't do anything with it
  • Jallibad
    2nd Dec 2012 Member 0 Permalink

    @Rawrkanos (View Post)

     "old Frankenstein's Monster of code."

    It was just rewritten into c++

  • Rawrkanos
    2nd Dec 2012 Member 0 Permalink

    @Jallibad (View Post)

     Given that I'm not the first to suggest OpenCL and I hope I'm not the first to suggest multithreading, that means a giant pile of "perfect timing" was just glossed over and avoided. Fine, the code was just rewritten. Hopefully that means adding some more bits in will be easy. If not? Then it was a wasted oppurtunity.

  • jacksonmj
    2nd Dec 2012 Developer 0 Permalink

    @Jallibad (View Post)

    Actually, most of the simulation code was not rewritten, the old functions were just moved and renamed.

  • Rawrkanos
    5th Dec 2012 Member 0 Permalink

    @jacksonmj (View Post)

     So then, it really is a frankenstein's monster of code?

  • jacob1
    5th Dec 2012 Developer 0 Permalink
    @Rawrkanos (View Post)
    yes, it still is. At least the simulation code in Simulation.cpp, it's extremely ugly in some places still. Maybe something could be done, I don't know if it's ever planned though. Most people seem to be able to play the game with a good enough fps.
  • cj646464
    5th Dec 2012 Member 0 Permalink

    Except for me,