Archived

This topic is now archived and is closed to further replies.

Tszafran

Time Based Sprite Animation

Recommended Posts

Hi, I am drawing 2D sprites using the D3DXSprite class and my FPS is around 210, I was wondering how to do animations that will be fluid at all frame rates. Right now my 16 frame animation goes way too quickly, I am doin it this way so far everyframe: Surface.CurrentFrame++; Draw(Surface) As you can see it will go through the frames as fast as the frame rate is. How can I do it so that it is fluid in all frame rates? Thanks, for any help in advance.

Share this post


Link to post
Share on other sites
It would be a good idea to implement a timer so that you can have framerate independant animation.

Regards,
Sharky

Share this post


Link to post
Share on other sites