Original Post
For the longest time, whenever I needed to move crap around the screen I did something as simple as this:
That is just a simple Euler integration with a very inaccurate "delta_t" equal to one. So, if I wanted more accuracy I would set "delta_t" to a really small number and change my code to this:
But, of course this makes everything slower. So, my question, when people use smaller values for "delta_t" to make the integration more accurate do they increase the fps? Or is there something else that I am missing?
Edited by - jag_oes on December 14, 2001 4:50:36 PM
// change velocity due to acceleration
velocity += acceleration;
// change position due to velocity
position += velocity;
|
// time step between this and last time calculations were done
delta_t = .01;
// change velocity due to acceleration
velocity += acceleration * delta_t;
// change position due to velocity
position += velocity * delta_t;
|

