Sign in to follow this  
Asheh

Physics Updating

Recommended Posts

I have been looking into physics, although I worked in indsutry for a year I only just overviewed the physics but I did notice it was updated more than once a frame (i believe for forza 2 the physics runs at 360fps). Can anyone here explain why this is? Accuracy? Collision? Cheers. Ash.

Share this post


Link to post
Share on other sites
Probably a combination of stability (so things don't go flying off) and reproducibility (so a box falls exactly the same way every time the game is played).

Share this post


Link to post
Share on other sites
1, physics simulations tend to be most stable at some timestep X. X varies based on range of inputs (floating point on a PC isn't equally accurate at all values). But X tends to have some upper and lower bound that makes the simulation look best.
2, physics simulations like fixed timesteps. That means interpolating across rendered frames what the simulation is spitting out (especially if you don't have fixed framerates). If you simulate faster than the visual output (and even take user input faster than visual output) then the game tends to feel smoother and more responsive.

Share this post


Link to post
Share on other sites
This is mostly done due to accuracy. One prominent example being cloth simulation which you should easily be able to find some tutorials for explaining this issue. The less updates you have the greater the delta from frame n to frame n+1, obviously. And that's the problem, the bigger the delta the greater the loss in accuracy due to floating point precision and other algorithmic instabilities. Hence it is perfectly valid to update the physics n times with respect to one rendering update to have only a factor of delta/n in your physics calculations as opposed to delta.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this