Playing a movie at constant frame rate

BlitzMax Forums/BlitzMax Beginners Area/Playing a movie at constant frame rate

dario(Posted 2005) [#1]
I have an Image with N frames, each MxM pixels in size. I want to animate this movie as efficiently as possible ensuring a *constant frame rate*.

In a a loop like

SetBlend SOLIDBLEND
For j=1 To ntimes
For n=0 To (N-1)
DrawImage image,M,M,n
FlushMem
Flip
Next
Next

I see often that the first few seconds things are slowed down and jerky over time... They later settle, but there is difficult to see if the loop is running in real-time or not.

Is there a way to ensure a constant frame rate?
Is there a way to check if Flips are occuring at the frame rate set by the graphics mode?
Does 'flip' block execution until the next VSYNC?

Thanks in advance....
--
Dario


ImaginaryHuman(Posted 2005) [#2]
It kind of sounds as though your animation is making hovering near to a solid framerate like just short of 60fps or 30ps, so it's dipping out of sync now and then. If you make it a bit smaller it might be smoother, but then, only on your system. Some other people's systems it might be totally smooth.