FPS

Blitz3D Forums/Blitz3D Beginners Area/FPS

Clarks(Posted 2004) [#1]
How can i retrieve my current frame rate? I thought there was a command in blitz for this but i dont see any


Ice9(Posted 2004) [#2]
Look in the code archive lots of good stuff there
http://www.blitzbasic.com/codearcs/codearcs.php?code=441


Zethrax(Posted 2004) [#3]
Here's the code I use to do it.

; -- Frames Per Second counter.
; Place into the main program loop where it will be executed each frame. The variables used here do not need to be declared globlly as this will occur automatically if the routine is placed in the main program. The value of 'milli_secs' should be set from the 'MilliSecs()' Blitz function at the start of the main program loop.
FPS_framecounter = FPS_framecounter + 1
If milli_secs >= FPS_timeout Then
	FPS_timeout = milli_secs + 1000
	FPS_framecount = FPS_framecounter
	FPS_framecounter = 0
EndIf
Color 180, 0, 0
Text 350, 5, "FPS"
Color 255, 255, 255
Text 400, 5, FPS_framecount
;^^^^^^



Clarks(Posted 2004) [#4]
Thanks Arbitrage and Axeman.