'Speed' of loop

BlitzMax Forums/BlitzMax Beginners Area/'Speed' of loop

Hi xlsior, are you talking about my example?

I didnt test it when I added the extra code, but I have just tried now and it seems to work alright...

Heres a copy and paste runnable example:
SuperStrict

Graphics 800,600

Local reelblur:Timage = CreateImage(100,100,10, DYNAMICIMAGE)

For Local x% = 0 To 8 Step 2
	Cls
	SetColor Rand(255),Rand(255),Rand(255)
	DrawOval 0,0,100,100
	SetColor 255,255,255
	DrawText x,50,50
	GrabImage(reelblur,0,0,x)
	Cls
	SetColor Rand(255),Rand(255),Rand(255)	
	DrawRect 0,0,100,100
	SetColor 255,255,255	
	DrawText x+1,50,50
	GrabImage(reelblur,0,0,x+1)
Next

Local a% = 0
Local frameDelay%=0

Repeat
	Cls
	If KeyDown(KEY_SPACE) Then
		frameDelay:+ 1
		If frameDelay > 10
				frameDelay = 0				
				If a<8 Then
					a:+ 1					
				Else
					a=0
				End If
		EndIf		
		DrawImage reelblur,0,0,a
	End If
	Flip
Until KeyHit(KEY_ESCAPE)