Hi,
I can't seem to get smooth sprite movement at lower FPS rates. Throwing delta timing aside (which I thought was the problem) and using what should be steady(ish) delays, I'm still getting blurred sprites between 30 - 50fps
Surely this shouldn't be happening at anything above 30fps?
Try this and also try changing the delay method between delay, a loop and a timer. When using the Delay & loop method, use '1' and '2' to adjust the delay. Also try without Cls, same happens.
Am I doing something wrong?
Cheers
Tom
I can't seem to get smooth sprite movement at lower FPS rates. Throwing delta timing aside (which I thought was the problem) and using what should be steady(ish) delays, I'm still getting blurred sprites between 30 - 50fps
Surely this shouldn't be happening at anything above 30fps?
Try this and also try changing the delay method between delay, a loop and a timer. When using the Delay & loop method, use '1' and '2' to adjust the delay. Also try without Cls, same happens.
Am I doing something wrong?
Cheers
Tom
Strict Graphics 800,600,32,60 '60hz AutoMidHandle True SetMaskColor(255,0,255) Global blob:TImage = LoadImage("C:\blitzmax\samples\simonh\fireworks\spark.png") Global fps:fpsCounter = New fpsCounter Global pause:Int = 0 Global bx:Int = 0 Global timer:Int = CreateTimer(40) While Not KeyHit(KEY_ESCAPE) Local b:Int,i:Int 'throw in a delay Delay pause 'WaitTimer(timer) 'an alternative to Delay 'For i=1 To pause * 1000000 ' b=i*i 'Next If KeyHit(KEY_1) pause:-1 If KeyHit(KEY_2) pause:+1 If pause<0 pause=0 Cls DrawImage blob,bx,100 bx:+10 If bx>799 Then bx = 0 fps.update() DrawText("use '1' and '2' to alter pause: "+pause,0,0) DrawText("FPS: "+fps.currentFPS,0,40) Flip FlushMem Wend End Type fpsCounter Field currentFPS:Int Field oldMS:Int Field counter:Int Method Update() counter:+1 If (MilliSecs() - oldMS) > 1000 oldMS = MilliSecs() currentFPS = counter counter = 0 End If End Method End Type