Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tiledata:
- DATALONG $11122111 ' Tile #0
- DATALONG $11244211
- DATALONG $11244211
- DATALONG $12444421
- DATALONG $12666621
- DATALONG $12666621
- DATALONG $12666621
- DATALONG $12222221
- DATALONG $11133111 ' Tile #1
- DATALONG $11355311
- DATALONG $13566531
- DATALONG $35655653
- DATALONG $35655653
- DATALONG $13566531
- DATALONG $11355311
- DATALONG $11133111
- DATALONG $11333311 ' Tile #2
- DATALONG $13111131
- DATALONG $31711713
- DATALONG $31111113
- DATALONG $31311313
- DATALONG $31133113
- DATALONG $13111131
- DATALONG $11333311
- palettedata:
- DATAINT $0000,$0000,$046A,$0EEE,$0CCC,$00EE,$0EA0,$0C42
- DATAINT $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
- loadTiles tiledata, 3, 256
- palettes palettedata, 0, 0, 16
- missileOne = addsprite(1, 1)
- coin = addsprite(1, 1)
- player = addsprite(1, 1)
- propsprite missileOne, 256, 0
- propsprite coin, 257, 0
- propsprite player, 258, 0
- dim x as integer
- dim y as integer
- x = 128 + 100
- y = 128 + 100
- randomize timer
- coinX = 128 + rnd(320 - 16)
- coinY = 128 + rnd(224 - 16)
- playerMovementSpeed = 1
- missileOneX = 0
- missileOneY = 0
- movesprite missileOne, missileOneX, missileOneY
- movesprite player, x, y
- movesprite coin, coinX, coinY
- dim missileOneShot as integer
- dim missileTwoShot as integer
- dim missileThreeShot as integer
- missileOneShot = 0
- missileTwoShot = 0
- missileThreeShot = 0
- psgVol 0, 15
- psgVol 1, 15
- psgVol 2, 15
- palette rgb(7, 7, 7), 0, 1
- do
- locate 5, 5
- print missileOneY
- locate 6, 5
- print coinY
- if joypad().0 then y = y - playerMovementSpeed
- if joypad().1 then y = y + playerMovementSpeed
- if joypad().2 then x = x - playerMovementSpeed
- if joypad().3 then x = x + playerMovementSpeed
- if joypad().7 then
- if missileOneShot = 0 then
- missileOneX = x
- missileOneY = y
- missileOneShot = 1
- end if
- end if
- if missileOneShot = 1 then
- psg 0, missileOneY
- missileOneY--
- if missileOneY = 128 - 8 then
- missileOneShot = 0
- missileOneX = 0
- missileOneY = 0
- psg 0, -1
- end if
- end if
- if missileOneY > coinY and missileOneY < coinY and missileOneX > coinX and missileOneX < coinX then
- randomize timer
- coinX = 128 + rnd(320 - 16)
- coinY = 128 + rnd(224 - 16)
- end if
- movesprite missileOne, missileOneX, missileOneY
- movesprite player, x, y
- movesprite coin, coinX, coinY
- sleep 1
- loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement