How to measure FPS?
Blitz3D Forums/Blitz3D Beginners Area/How to measure FPS?
| ||
@all Using BlitzPlus - whats the optimal way to measure the FPS realtime? |
| ||
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 |
| ||
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 ;^^^^^^ |
| ||
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. |
| ||
You could use Fraps... http://www.fraps.com/downloads.htm It handles FPS logging, screen captures and movie renders to boot :o) YAN |
| ||
@all Thanks for all your advise |
| ||
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 |