Powder Toy only using one CPU core

  • The8BitPotato
    11th Jun 2017 Member 1 Permalink

    I'm using Linux, and I have this little CPU usage monitor on the bottom of my screen with two bars that each keep track of one CPU core. When I do something intensive in Powder Toy, like fill the screen up with DUST, one bar shoots up to full usage while the other one is hardly doing anything. Is there a way I can configure or compile Powder Toy so it takes advantage of both CPU cores?

    Edited once by The8BitPotato. Last: 11th Jun 2017
  • basiliotornado
    11th Jun 2017 Member 0 Permalink

    i dont think so but that would be cool!

  • jacob1
    11th Jun 2017 Developer 0 Permalink
    TPT only uses one core. There are a few minor tasks that go in other threads, but besides that you can't make it use more than one.
  • deleted
    11th Jun 2017 Member 0 Permalink
    Maybe split the task op in more little ones?
    Like pressure calculations and heat distribution in a separate thread?

    Also now I think about it, the network connection is on the main thread.
    This can freeze the game if a network time-out happens.

    (also using linux)
  • jacob1
    11th Jun 2017 Developer 0 Permalink
    @dodo_hacker (View Post)
    Network connections are actually one of the things that are sometimes on another thread. The save browser does the downloads in another thread. Some simpler things such as voting on saves are not, which you can tell because the game freezes every time you click the vote button. If we move all non-threaded network connections to the DownloadManager class it would prevent this problem.

    Pressure calculation is the #1 candidate for multithreading. The design is already perfect for multithreaded (I actually almost wonder why it isn't already). Heat simulation not so much, but we could possibly do it.

    I'd love to have particle rendering in another thread. That would give a really large performance improvement. It would also mean you could always use fancy graphics without getting any fps dip.
  • deleted
    11th Jun 2017 Member 0 Permalink
    Checking for updates is not on a separated thread I think.
    Also I feel stupid not thinking about rendering on a separated thread. :(