KSPModdingLibs/KSPCommunityFixes

Performance: tweak the settings on the max physics dt slider to allow for optimal settings

JonnyOThan opened this issue · 7 comments

The max physics dt slider in the UI has a minimum value of 0.03, while the fixed timestep is 0.02. This means that if the game frames are taking longer than 30ms, Unity will run 2 fixed updates on every other frame (I.e. 3 fixed updates every two frames). This degrades the framerate.

It’s possible to set the max physics dt to 0.02 directly in the settings cfg (as long as you don’t open the settings ui again) and it will improve performance at the expense of physics time running slower than real time.

Would it be possible to get KSPCF to tweak the UI slider to allow for 0.02 to be set directly there?

Sounds reasonable to have as an option, and shouldn't be too hard to implement.

wahoo! Maybe the settings.cfg should include some language about WHY you might want to set max physics dt to 0.02?

(I can certainly do this….sometime…)

Well the readme has a link to this issue. I doubt adding an abstract on the matter in the config file will help anyone.
Ideally, such an abstract would be in a tooltip over the in-game control, but I'm not sure how difficult this would be to add...

Oh I love the tooltip idea. There's a lot of misconceptions about what this value actually does.

What do you think of :

How the game handle CPU bottlenecked situations, relevant with large part count vessels :
- Lower value : higher and smoother FPS, but game time might advance slower than real time
- Higher value : lower and choppier FPS, but game time will advance closer to real time

Works for me.