Frame Limit

BlitzMax Forums/BlitzMax Beginners Area/Frame Limit

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.

SuperStrict 
Global FrameTimer:TTimer=CreateTimer(60)
Global old_tick:Int , new_tick:Int
Global counter:Int
Graphics 640,480

Repeat

'independent of tick

counter:+1

new_tick = TimerTicks(Frametimer)
If new_tick>old_tick
	Cls
	DrawText "Ticks:"+new_tick,100,100
	DrawText "Counter:"+counter,100,116
	Flip
	old_tick = new_tick
EndIf

Until KeyHit(Key_Escape) Or AppTerminate()