fb:porticula NoPaste
Mein Kleines Spiel
Uploader: | Sh4d0w |
Datum/Zeit: | 10.06.2012 22:57:50 |
ScreenRes 300, 300 , 32
WindowTitle "Pushi"
'Tasten
Dim taste As String
'Player
Dim pSpeed As Integer
Dim pX As Integer
Dim pY As Integer
'Level
Dim map1 (10, 10) As integer
map1(0, 2) = 1
map1(1, 1) = 1
map1(2, 2) = 1
map1(3, 1) = 1
map1(4, 2) = 1
map1(5, 1) = 1
map1(6, 2) = 1
map1(7, 1) = 1
map1(8, 2) = 1
map1(9, 1) = 1
map1(10, 2) = 1
pSpeed = 1
pX = 5
pY = 5
Do
taste = InKey
If taste = "w" And map1 (px, py-1) = 0 Then pY -= pSpeed
If taste = "s" And map1 (px, py+1) = 0 Then pY += pSpeed
If taste = "a" And map1 (px-1, py) = 0 Then pX -= pSpeed
If taste = "d" And map1 (px+1, py) = 0 Then pX += pSpeed
ScreenLock
For x As Integer = 0 To 9
For y As integer = 0 To 9
If map1(x, y) = 1 Then Line(x*30, y*30) - ((x+1)*30, (y+1)*30), RGB(255, 0, 0),BF
If map1(x, y) = 0 Then Line(x*30, y*30) - ((x+1)*30,(y+1)*30) , RGB(0, 255, 0),BF
Next
Next
ScreenUnLock
Line (px*30,py*30) - ((px+1)*30 , (py+1) * 30) , RGB(255,255,0) , BF
Sleep 1,1
Loop Until taste = Chr(27)
sleep