Are we still talking about the code you posted above ? I've included the Cls command, and placed the character in the middle of the screen:
Graphics 1280, 1024, 0, 2
SetBuffer BackBuffer()
Type bullet
Field x#,y#
Field xv#,yv#
Field frame
End Type
cl1 = LoadImage("Images\Clouds\Cloud_1.bmp")
cl2 = LoadImage("Images\Clouds\Cloud_2.bmp")
pl1 = LoadImage("Images\Platforms\Platform_1.bmp")
pl2 = LoadImage("Images\Platforms\Platform_2.bmp")
pl3 = LoadImage("Images\Platforms\Platform_3.bmp")
pl4 = LoadImage("Images\Platforms\Platform_4.bmp")
pl5 = LoadImage("Images\Platforms\Platform_5.bmp")
pl6 = LoadImage("Images\Platforms\Platform_6.bmp")
wl1 = LoadImage("Images\Walls\Wall_1.bmp")
wl2 = LoadImage("Images\Walls\Wall_2.bmp")
vn1 = LoadImage("Images\Misc\Vine_1.bmp")
Global chtr = LoadAnimImage("Chtr.bmp",47,53,0,24)
Global chtr_bullet = LoadAnimImage("Chtr_bullet.bmp",19,7,0,2)
Global chtr_frame = 0
Global cx# = 400
Global cy# = 400 - ImageHeight(chtr)
Global chtr_frame_t = MilliSecs()
Global chtr_frame_ta = True
Global chtr_frame_delay = 50
Global chtr_freeze = 0
Global chtr_jump = False
Global chtr_yv# = 0
;jump to first data
Restore level1
While Not KeyHit(1)
Cls
Restore
For y = 0 To 18
For x = 0 To 24
Read filled
Select filled
Case 1
DrawImage cl1,x*32,y*32
Case 2
DrawImage cl2,x*32,y*32
Case 3
DrawImage pl1,x*32,y*32
Case 4
DrawImage pl7,x*32,y*32
Case 5
DrawImage pl6,x*32,y*32
Case 6
DrawImage wl2,x*32,y*32
Case 6
DrawImage vn1,x*32,y*32
End Select
Next
Next
UpdateBullet()
UpdatePlayer()
Flip
Wend
End
Function UpdatePlayer()
DrawImage chtr,cx#,cy#,chtr_frame
;walk
If KeyDown(205)
cx# = cx# + 2
chtr_freeze = 0
If MilliSecs() > chtr_frame_t + chtr_frame_delay
chtr_frame = chtr_frame + 1
chtr_frame_ta = False
If chtr_frame > 8
chtr_frame = 0
EndIf
EndIf
If chtr_frame_ta = False
chtr_frame_t = MilliSecs()
chtr_frame_ta = True
EndIf
ElseIf KeyDown(203)
cx# = cx# - 2
chtr_freeze = 12
If MilliSecs() > chtr_frame_t + chtr_frame_delay
chtr_frame = chtr_frame - 1
chtr_frame_ta = False
If chtr_frame < 13
chtr_frame = 23
EndIf
EndIf
If chtr_frame_ta = False
chtr_frame_t = MilliSecs()
chtr_frame_ta = True
EndIf
ElseIf Not KeyDown(203) And KeyDown(205)
chtr_frame = chtr_freeze
EndIf
;end walk
;shoot
If KeyHit(57)
If chtr_freeze = 0
CreateBullet(cx# + (ImageWidth(chtr)/2),cy# + 20,20,0)
ElseIf chtr_freeze = 12
CreateBullet(cx#,cy# + 20,20,0)
EndIf
EndIf
;end shoot
;Jump
If chtr_jump = False
If KeyHit(200)
chtr_jump = True
chtr_yv# = -5
EndIf
EndIf
If chtr_jump = True
chtr_yv# = chtr_yv# + .1
EndIf
cy# = cy# + chtr_yv#
If cy# > 600 - ImageHeight(chtr)
chtr_yv# = 0
cy# = 600 - ImageHeight(chtr)
chtr_jump = False
EndIf
;end jump
End Function
Function CreateBullet(x#,y#,xv#,yv#)
b.bullet = New bullet
b\x# = x#
b\y# = y#
b\xv# = xv#
b\yv# = yv#
If chtr_freeze = 0
b\xv# = b\xv#
b\frame = 1
Else
b\xv# = -b\xv#
b\frame = 0
EndIf
End Function
Function UpdateBullet()
For h.bullet = Each bullet
h\x# = h\x# + h\xv#
If h\x# < 0
Delete h
ElseIf h\x# > 800
Delete h
Else DrawImage chtr_bullet,h\x#,h\y#,h\frame
EndIf
Next
End Function
.level1
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,0,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,0,3,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,0,3,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,0,0,0,0,0,3,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,5
Data 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
Data 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
Function LoadImage(n$)
im = CreateImage(64, 64)
For i = 0 To 100
Color Rand(255), 0, 0
Oval Rand(64), Rand(64), 10, 10
Next
GrabImage im, 0, 0
Return im
End Function
Function LoadAnimImage(n$, w, h, d, f)
im = CreateImage(w, h, f)
For fr = 0 To f - 1
For i = 0 To 100
Color 0, 0, Rand(255)
Oval Rand(64), Rand(64), 10, 10
Next
GrabImage im, 0, 0, fr
Next
Return im
End Function
I replaced LoadImage/LoadAnimImage with a custom function, for testing. If you run it, you can see the blue thingie walk around the red thingies world.
If you comment the functions out, it should load the original image files again.