Frame rate counter

BlitzPlus Forums/BlitzPlus Programming/Frame rate counter

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

try this. it will update the fps every second.

graphics 800,600
setbuffer backbuffer()

while not keyhit(1)
        cls

	If MilliSecs()<timer+1000 Then
								    frame=frame+1
	Else
								    fps=frame
								    frame=0
								    timer=MilliSecs()
	End If

        text 0,0,"fps="+fps
        flip
wend
end