Hi,
I have a sprite working just fine but when I try adding a background I get problems.The code below is correct but when I add a background image it flickers and the sprite doesn't show.
Any suggestions ? Thanks in advance.
Graphics 1280,854 'set gfx mode
Global FrameTimer = MilliSecs()
Global frame:Int = 0
Global myimage:TImage = LoadAnimImage("ko1.png",32,32,0,240)
Repeat
Cls
DrawImage myimage,50,50,frame
If MilliSecs() > FrameTimer + 100
FrameTimer = MilliSecs()
frame:+1
EndIf
If frame >239 Then frame = 0
Flip
FlushMem
Until KeyHit(KEY_ESCAPE)
I have a sprite working just fine but when I try adding a background I get problems.The code below is correct but when I add a background image it flickers and the sprite doesn't show.
Any suggestions ? Thanks in advance.
Graphics 1280,854 'set gfx mode
Global FrameTimer = MilliSecs()
Global frame:Int = 0
Global myimage:TImage = LoadAnimImage("ko1.png",32,32,0,240)
Repeat
Cls
DrawImage myimage,50,50,frame
If MilliSecs() > FrameTimer + 100
FrameTimer = MilliSecs()
frame:+1
EndIf
If frame >239 Then frame = 0
Flip
FlushMem
Until KeyHit(KEY_ESCAPE)