I have looked at several other posts that tell how to set
the frame rate, but it's usually confusing or spread out.
Can anyone give me a just-fps-code solution?
Const FPS=30
period=1000/FPS
time=MilliSecs()-period
While Not KeyHit(1)
Repeat
elapsed=MilliSecs()-time
Until elapsed
;how many 'frames' have elapsed
ticks=elapsed/period
;fractional remainder
tween#=Float(elapsed Mod period)/Float(period)
For k=1 To ticks
time=time+period
If k=ticks Then CaptureWorld
UpdateGame()
UpdateWorld
Next
Next
RenderWorld tween
Flip
Wend
see samples,mak, castle demo