I have been trying to work on some collisions using CollideImage but it is very slow, I only have 2 images and my i7 starts to stutter. I tried the same code a few years back and it worked perfectly.
Graphics 640, 480
'SetBlend ALPHABLEND
Local Alien:TImage = LoadImage("ufo.png")
Local Player:TImage = LoadImage("blob.png")
'MidHandleImage Player
While Not KeyHit(KEY_ESCAPE) Or AppTerminate()
Cls
DrawImage Alien, 150, 150
CollideImage(Alien, 150, 100, 0, 0, 2)
DrawImage Player, MouseX(), MouseY()
If CollideImage(Player, MouseX(), MouseY(), 0, 2, 0)
SetClsColor 255, 0, 0
Else
SetClsColor 0, 0, 0
End If
Flip()
WEnd
Any idea why or what I should do?
|