at the moment I am programming a simple 2D Game Engine (Just because i want to do it, i know there are already lots of awesome ones)
But this just btw...
My actually Problem:
I got a normal game loop with methods like update() and draw(). Now I want to display a Sprite Animation (Just 3 Frames), but its logical, that i got more fps than 3 (about ~90.000), but i dont want the animation to be played back as fast as this. I want that in one second one play back is done. So now my question: Whats the best way to realize this? How can i translate these framerates together? I know i could do something like divide my actual FPS with the frames my animation got and take the result to know how many frames i have to wait till i can show the next frame, but i dont like that. So I need some input from you guys.
Thank you very much for reading.