ok her it is (tank is player)(map is test map)
Graphics 800,600,0,2
AutoMidHandle True
SetBuffer BackBuffer()
SeedRnd MilliSecs()
;load images
mapimage = LoadImage("art&graphics\art&tiles\test map b.bmp")
tankimage = LoadImage("art&graphics\graphics\tank.bmp")
;change just the numbers in the parenasis.
ScaleImage mapimage,Rnd(0.5,0.5),Rnd(0.5,0.5)
;constants
Const SPACEBAR = 57, UPKEY = 200, DOWNKEY = 208, RIGHTKEY = 205, LEFTKEY = 203
;types
Type tank
Field x,y
End Type
tank.tank = New tank
tank\x = 220
tank\y = 210
While Not KeyDown(1)
If KeyDown(203)
tank\x = tank\x - 10
EndIf
If KeyDown(205)
tank\x = tank\x + 10
EndIf
If KeyDown(200)
tank\y = tank\y - 10
EndIf
If KeyDown(208)
tank\y = tank\y + 10
EndIf
Cls
Flip
DrawImage mapimage,(400),(300)
MaskImage tankimage,255,255,255
DrawImage(tankimage ,tank\x,tank\y)
Flip
Wend
Graphics 800,600,0,2
AutoMidHandle True
SetBuffer BackBuffer()
SeedRnd MilliSecs()
;load images
mapimage = LoadImage("art&graphics\art&tiles\test map b.bmp")
tankimage = LoadImage("art&graphics\graphics\tank.bmp")
;change just the numbers in the parenasis.
ScaleImage mapimage,Rnd(0.5,0.5),Rnd(0.5,0.5)
;constants
Const SPACEBAR = 57, UPKEY = 200, DOWNKEY = 208, RIGHTKEY = 205, LEFTKEY = 203
;types
Type tank
Field x,y
End Type
tank.tank = New tank
tank\x = 220
tank\y = 210
While Not KeyDown(1)
If KeyDown(203)
tank\x = tank\x - 10
EndIf
If KeyDown(205)
tank\x = tank\x + 10
EndIf
If KeyDown(200)
tank\y = tank\y - 10
EndIf
If KeyDown(208)
tank\y = tank\y + 10
EndIf
Cls
Flip
DrawImage mapimage,(400),(300)
MaskImage tankimage,255,255,255
DrawImage(tankimage ,tank\x,tank\y)
Flip
Wend