How to measure FPS?

Blitz3D Forums/Blitz3D Beginners Area/How to measure FPS?

Hansie(Posted 2004) [#1]
@all

Using BlitzPlus - whats the optimal way to measure the FPS realtime?


Klaas(Posted 2004) [#2]
Have a look in the code archive ... there are probably some FPS counter'S

that for example:
http://www.blitzbasic.com/codearcs/codearcs.php?code=441


Zethrax(Posted 2004) [#3]
This is the FPS counter code I use.


	; -- 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
	;^^^^^^




Warren(Posted 2004) [#4]
I personally store the FPS results of the last 10 frames and display the average of them. It helps to smooth over spikes and makes the number more easily readable.


Yan(Posted 2004) [#5]
You could use Fraps...

http://www.fraps.com/downloads.htm

It handles FPS logging, screen captures and movie renders to boot :o)


YAN


Hansie(Posted 2004) [#6]
@all
Thanks for all your advise


mearrin69(Posted 2004) [#7]
I'm with EpicBoy on this one. 10 frame moving average. You can even extend that out for load prediction - even iffy projections can be healthy at time.
M