Code:
#define FPS 68 // Frames per seconds can be changed individually


I really hope that you just tried to be funny.


Quote:

What do you mean that timer doesn't work between two frames?

Look into the manual into the timer function.
Oh and my approach is 100% precise as long as time_frame is precise (which it really should be), it multiplied by 16 to get the seconds with miliseconds needed for the drawing.

And another thing: Casting into an integer (not via the integer() function but with a plain (int)) is much faster than an expensive multiplication that needs at least four processor cycles to finish.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com