Frame tweening - how can I tell spare frametime?

Blitz3D Forums/Blitz3D Programming/Frame tweening - how can I tell spare frametime?

Vorderman(Posted 2005) [#1]
Is there a frame-tweening locked-logic 3d framework around that enables me to see not only the FPS but also how much free time remains on each frame?

I'm currently using the original 3d framework from the code archives ( http://www.blitzbasic.com/codearcs/codearcs.php?code=9 ) which works very well but I can't find a way to tell how much time I have spare at, for example, 60FPS.

If anyone's using this framework and can tell me how to modify it to show spare frametime, or if anyone has a frametweening or smooth system they would share it would be very useful.


WolRon(Posted 2005) [#2]
how much free time remains on each frame?
Don't forget the Scanline() command.

Why are you asking the same question twice?


Vorderman(Posted 2005) [#3]
Sorry - didn't think anyone would read the other post!

What's the scanline() command? - never heard of that one.


DJWoodgate(Posted 2005) [#4]
It is supposed to return the current scanline of the display. Its not something I have a lot of confidence in but I suppose you could try it because the millisecs() timer is a bit coarse for accurate frame timing. For instance your refresh rate is 75hz which should give you a frame time of 13.333 millisecs. Something else to bear in mind though is that in fullscreen flip is non blocking. So the wait for Vsync does not occur at flip, which does not force a Vwait at that point, typically it occurs at renderworld in the following frame or maybe even the frame after on more advanced cards? Good for your framerate because the graphics card does not have to hang around waiting for Vsync all the time and can get working on the next frame which is perhaps another reason why fullscreen is faster than windowed mode. Good luck in figuring out how this works in conjunction with frame locked logic though. I figure it's easier to just let it get on with it.