O.Stogden
Member
Hey everyone,
I've been working on implementing Delta timing into my game, and everything is working fine, however I'm having a little trouble with the physics side of things.
I get that physics doesn't operate on the usual "step" system that the rest of the game runs on, so I've left the physics system entirely out of the delta time calculations, except the number I'm using to apply force to the car is being affected by delta time. (The car's acceleration stat is doubled at 30FPS for example)
Unfortunately when I ran tests, it doesn't quite add-up.
PC running at 60FPS:
Car reaches end of straight in approx 6.5 seconds.
Laptop running at 28-30FPS:
Car reaches end of straight in approx 8 seconds.
Also the car seems to drift a lot more at 30FPS, you have to steer much earlier for the corners as the car carries on in the forward motion for much longer.
I'm guessing this is because phy_speed is around 24 at 30FPS and around 12 at 60FPS, and this throws off the physics calculations for angular/linear damping and friction etc.
Does anyone have some tips on how to handle physics when adding delta timing?
I've been working on implementing Delta timing into my game, and everything is working fine, however I'm having a little trouble with the physics side of things.
I get that physics doesn't operate on the usual "step" system that the rest of the game runs on, so I've left the physics system entirely out of the delta time calculations, except the number I'm using to apply force to the car is being affected by delta time. (The car's acceleration stat is doubled at 30FPS for example)
Unfortunately when I ran tests, it doesn't quite add-up.
PC running at 60FPS:
Car reaches end of straight in approx 6.5 seconds.
Laptop running at 28-30FPS:
Car reaches end of straight in approx 8 seconds.
Also the car seems to drift a lot more at 30FPS, you have to steer much earlier for the corners as the car carries on in the forward motion for much longer.
I'm guessing this is because phy_speed is around 24 at 30FPS and around 12 at 60FPS, and this throws off the physics calculations for angular/linear damping and friction etc.
Does anyone have some tips on how to handle physics when adding delta timing?