Getting FPS?
Blitz3D Forums/Blitz3D Programming/Getting FPS?
| ||
How can i get the FPS my game is running at? |
| ||
in your main loop do something like this:;main loop repeat ;all your normal stuff here... updateworld renderworld fpscounter=fpscounter+1 if millisecs()-fpstime>1000 then fps=fpscounter fpscounter=0 endif text 0,0,"Frame rate:"+fps if fps>0 then text 0,15,"Better value is millisecs per frame:"+float(1000.0)/float(fps) flip false until gameover or keydown(1) |
| ||
Check out the frame limiting code (among other things) on my programming tutorial website. |