[SDL] Framerate and speed interpolation

Bob Pendleton bob at pendleton.com
Mon Nov 24 12:51:01 PST 2003

On Mon, 2003-11-24 at 13:46, Carlos Alvarez wrote:

> Can the motion angle be still affected by framerate (if no framerate
> regulation) although speed is displayed as constant ?

I'm not sure I understand this question. 

Are you asking if you can safely adjust the angle based on the frame
rate? That is, your object is spinning or changing direction over time
as well as moving? In that case you compute the change in angle the same
way you compute the change in distance. For example:

angle = rate * deltaT

where "rate" is in degrees or radians per second and delaT is the time
(in seconds) since the last update.

At least that works for a first approximation. If you want a physically
accurate curve you need to use the parametric forms of the equations
that describe the physics you are modeling.

		Bob Pendleton

> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
+ Bob Pendleton: writer and programmer. +
+ email: Bob at Pendleton.com              +
+ web:   www.GameProgrammer.com         +

More information about the SDL mailing list