Jump to content

(SOLVED) Losing 300% performance after time warping


Recommended Posts

Whenever I time warp in a vacuum to do a burn, my FPS drops. I am fine with that. The issue is my fps fails to recover even at 1x speed. The only fix is to restart the game. The issue gets worse and worse the larger my craft is. Overclocking CPU is the only fix to improve the FPS.

It has gotten so bad that I am avoiding time warping with physics (alt+>). Is there a fix for this? Why does this happen? My CPU is an i7-5775C @ 4.2 GHz. The issue gets bad with part counts above 200.

 

No mods!

I can get 30 fps with a part count of around 300-500 parts. It stays at 30fps very consistently. As soon as I time warp to do a burn and go back to 1x speed, I am at 10fps. Reloading save, going to main menu does nothing. Re loading save after restarting the game fixes the FPS bug until I time warp again.

Doing a 20 minute burn suddenly becomes a dreaded occurrence.

 

I solved it! Someone mentioned Physics Delta Time to me. It was already set to the lowest setting, but setting PDT to max got me the FPS drop that I experience. I downloaded CheatEngine to search for 0.3 in float, found my PDT of 0.02999999933. With CheatEngine open, I was able to see my Physics Delta Time in game.

 

After using alt+> to time warp with physics, I saw my Physics Delta Time permanently change to 0.07999999933 even after going back to 1x speed. Using CheatEngine, I forced it back to 0.02999999933. Thus putting my FPS back to how it should be. This is a bug! CheatEngine is a bandaid.

 

This occurs on every copy of KSP I have. Tested on 1.7, 1.6.1, and 1.6.0.

 

My friend helped me make this script for CheatEngine. Because of all the negative stigma using this program, I won't link any downloads for a trainer. Now I can play the game without restarting every time I warp! All the script does is call up the PDT value without you needing to search for it on restarting the game.

 

{ Game   : KSP_x64.exe
  Version:
  Date   : 2019-05-25
  Author : Anonymous

  This script obtains the Float value of Physics Delta Time. Allowing players to force it back to the correct position
}

[ENABLE]

aobscanmodule(INJECT,KSP_x64.exe,89 81 F8 00 00 00 C3 CC CC CC CC CC CC CC CC CC) // should be unique
alloc(newmem,$1000,"KSP_x64.exe"+4E2ADC)

label(code)
label(return)

alloc(pdtPtr,8)
registersymbol(pdtPtr)

newmem:

code:
  mov [rcx+000000F8],eax
  mov [pdtPtr],rcx
  jmp return

INJECT:
  jmp newmem
  nop
return:
registersymbol(INJECT)

[DISABLE]

INJECT:
  db 89 81 F8 00 00 00

unregistersymbol(INJECT)
dealloc(newmem)

edit #2: Setting the Freeze interval to 1ms also fixes the bug where Apoapsis and Periapsis change when time warping! It also fixes an aircraft from pitching down or up when time warping.

Edited by Wilds
Link to comment
Share on other sites

  • 3 years later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...