Settings Hub and Perform TextureManager

This lag happens really randomly. Sometimes I don’t get it for a minute and sometimes I get it 10 times a second. I couldn’t tie these two to anything specific.

It’s actually game breaking to have this high lag spikes as my game checks the difference in expected velocity/position and actual velocity/position to understand if it hit anything. The lag spike causes it to think it hit something. It is adversely affecting the gameplay and development testing.


Do these lag spikes cause the actual velocity or position to change?

If you keep accelerating, 60ms (equivalent to 16 FPS) later the first and last velocity are going to be far different, which is the issue for me here. I’ll be making some changes that if it drops below 25 FPS, I’ll disable collision checking for that frame.

But this is a band aid solution.

1 Like

So, within 60ms, the actual velocity changes due to the actual acceleration, but the estimated velocity and position does not change? It sounds like acceleration is not part of your estimation.

You could:

  • Make sure you’re using acceleration in your estimation.
    • Without it, your estimation is not physically accurate. You shouldn’t have to rely on the time interval between checks being small enough that acceleration causes no big changes.
    • You should be able to calculate acceleration since you know all of the forces applied and know the mass of your ships.
  • Make sure you’re scaling velocity and acceleration with the delta time between frames or physics steps.

I would call the framerate-affects-estimation-accuracy a bug in your code regardless of if this engine bug gets fixed. Is there a reason you aren’t estimating acceleration already? Are you actually estimating acceleration and I’m understanding you wrong?

This bug does need to be fixed, definitely. I don’t want to take away from that or suggest it shouldn’t be fixed. I think your issue can be fixed independently of this bug, which will be a much quicker and better solution for you.