Need help with compiling questions

  • almarrkf
    12th Jun 2019 Member 0 Permalink

    Hello everyone,

     

    I've been playing TPT for a while and decided to dabble in modding. I have experience with C# coding but none with C++ or compilers and such.

     

    My first question: I noticed that when I compile the files I get from the latest github source with Visual Studio (following instructions on the TPT wiki), the resultant build has a much lower performance than build 94.1.343 from the game's official website. How can I fix this?

     

    By low performance, I mean I run both builds side-by-side. The build I make with VS does 15 fps at 26,000 particles, while the one from the website does more than 55 fps with the same number of particles. Note that I don't make any changes to the source from github for my build, just testing clean compiling.

     

    My second question: I tried building with the other method (scons.py) but it reaches a step saying libcurl isn't found. I tried "installing" libcurl but couldn't understand how that works, and I saw on these forms that Visual Studio is a much better alternative. I just wanted to see if I'll get a build with better performance with the other method. How do I successfully install libcurl to test this?

     

    Thanks a whole bunch and apologies if my questions are repeated elsewhere.

     

     

     

  • jacob1
    12th Jun 2019 Developer 0 Permalink
    Maybe you're compiling a debug build. In visual studio, near the top there is some dropdown for "Debug" / "Release" (could also have "Static"). Change it to release if you want good performance (makes it harder to debug, but that's what debug builds are for).

    Nobody has gotten tpt to compile on windows with scons since we've added libcurl, because it requires compiling libcurl. Which isn't actually too hard, maybe some day i'll update the guide with a libcurl I compile. But that guide needs much more work than just that, so I recommend people use visual studio instead.
  • almarrkf
    12th Jun 2019 Member 0 Permalink

    @jacob1 (View Post)

     

    Thanks a lot Jacob!

     

    Switching from Debug to Release fixed it -- Performance is now similar to build from the website.

     

    Thanks again