Time Delta, collision detection
(Sep 4, 2010 07:58 PM)Skorche Wrote: You could do a small step at the end to use up the rest of the time for the frame, but one of the benefits... (blah blah blah)
And I meant to end with: but if your game is simple enough this all probably doesn't matter. So yeah, as AnotherJake say, go ahead and try it. Nothing is hurt by experimenting.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
It does work fine for my simple physics code. But if I used your chipmunk library, it would be a lot better with a fixed timestep right? But how would I interpolate between states when chipmunk manages all the objects ?
Chipmunk works better with fixed size timesteps yes.
Same way you would if you were managing the physics state. You only interpolate when drawing, not when updating the state. You don't have to store the interpolated values anywhere.
Same way you would if you were managing the physics state. You only interpolate when drawing, not when updating the state. You don't have to store the interpolated values anywhere.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
So should I just pass the previous and current game state and the alpha value to the renderer? Or should have a method of the Game class that creates a new interpolating instance based on the previous current and alpha and then pass that to the renderer?
I call my states alpha, beta, and the interpolated one iota. Alpha is the newest tick, beta is the previous tick. I pass alpha and beta to my interpolator to create the new state, iota. iota is the one that the renderer reads to draw.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Optimize the collision detection | alaslipknot | 1 | 329 |
May 12, 2013 08:02 PM Last Post: SethWillits |
|
| Collision detection tutorial | ThemsAllTook | 7 | 18,475 |
Nov 5, 2011 05:20 PM Last Post: SethWillits |
|
| Help with Collision Detection..(i'm almost there) | carmine | 1 | 3,525 |
Jun 29, 2011 12:33 PM Last Post: ThemsAllTook |
|
| Collision detection for pinball game | johncmurphy | 0 | 3,710 |
Sep 6, 2009 02:46 PM Last Post: johncmurphy |
|
| Phases of Collision Detection | Ingemar | 5 | 5,484 |
Aug 24, 2009 06:11 AM Last Post: Skorche |
|

