HOME | DD

Published: 2023-08-25 01:04:06 +0000 UTC; Views: 513; Favourites: 0; Downloads: 1
Redirect to original
Description
set kernel_options pfcolorsset tv ntsc
set romsize 4k
set optimization speed
set optimization size
playfield:
................................
................................
..XXXX..XXXX.XXXXXX.X..X.XX.X...
..X..XX.X.....XX....X..X.X.XX...
..XX..X.XX.....XX...XX.X.X.XXX..
..XXXXX.XXXX...XX...XXXX.X..XX..
................................
................................
................................
................................
................................
end
title
COLUBK = $B8
COLUPF = $52
drawscreen
if joy0fire || joy1fire then goto skiptitle
goto title
skiptitle
playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X.............................X
X.............................X
X.............................X
X.............................X
X.............................X
X.............................X
X.............................X
X.............................X
X.............................X
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
startposx
player1x = rand
if player1x > 150 then goto startposx
startposy
player1y = rand
if player1y > 100 then goto startposy
player0x = 50 : player0y = 50
COLUBK = $B8
missile0height = 1 : missile0x = 88
NUSIZ0 = $00
score = 00000 : scorecolor = $1E
m = 0
main
COLUP1 = $80
COLUP0 = $40
COLUPF = $52
f=f+1
g=g+1
rem ship sprite
if f=10 then player0:
%10000010
%01101100
%01111100
%00111000
%00101000
%00010000
%00010000
%00000000
end
if f=20 then player0:
%00000000
%01101100
%01111100
%10111010
%00101000
%00010000
%00010000
%00000000
end
rem Octun_1
if g=10 then player1:
%00000000
%10100001
%01000100
%00101000
%01110000
%11101000
%11110000
%01100000
end
rem Octun_2
if g=20 then player1:
%00001010
%00100000
%01000100
%00101001
%01110000
%11101000
%11110000
%01100000
end
if f=20 then f=0
if g=20 then g=0
a = a + 1 : if a < 3 then goto checkfire
a = 0
if player1y < player0y then player1y = player1y + 1
if player1y > player0y then player1y = player1y - 1
if player1x < player0x then player1x = player1x + 1
if player1x > player0x then player1x = player1x - 1
player1x = player1x : player1y = player1y
rem limites do missile
checkfire
if missile0y>240 then goto skip
rem rotao do missil
missile0y = missile0y - 4 : goto draw
skip
if joy0fire then missile0y
rem tiro emitido inicia o jogo e sons de fundo e disparo
draw
drawscreen
if collision(missile0,player1) then score=score+1
rem a colis?o chama o pointsound
if collision(player0,player1) then score=score-1:goto deadsound
if m = 1 && collision(player0,playfield) then player0y = player0y + 1 : goto skipmove
if m = 2 && collision(player0,playfield) then player0x = player0x + 1 : goto skipmove
if m = 3 && collision(player0,playfield) then player0y = player0y - 1 : goto skipmove
if m = 4 && collision(player0,playfield) then player0x = player0x - 1: goto skipmove
if joy0up && !collision(player0,playfield) then player0y = player0y - 1 : m = 1 : goto skipmove
if joy0left && !collision(player0,playfield) then player0x = player0x - 1 : REFP0 = 8 : m = 2 : goto skipmove
if joy0down && !collision(player0,playfield) then player0y = player0y + 1 : m = 3 : goto skipmove
if joy0right && !collision(player0,playfield) then player0x = player0x + 1 : m = 4 : REFP0 = 0 : goto skipmove
skipmove
if player0x < player1x then REFP1 = 8
if player0x > player1x then REFP1 = 0
goto main
rem som ao acertar inimigo
pointsound
AUDV0 = 31
AUDC0 =08
AUDF0 = 06
p = p + 1
drawscreen
rem tempo que o som toca
if p < 8 then pointsound
p = 0
AUDV0 = 0: AUDC0 = 0: AUDF0 = 0
goto main
rem Som do heroi morredo
deadsound
AUDV1 = 15
AUDC1 = 08
AUDF1 = 31
p = p + 1
drawscreen
rem tempo que o som toca
if p < 30 then deadsound
p = 0
AUDV1 = 0: AUDC1 = 0: AUDF1 = 0
if a = 0 then goto title
goto main
rem som do tiro
firesound
AUDV0 = 10
AUDC0 = 12
AUDF0 = 09
p = p + 1
drawscreen
rem tempo que o som toca
if p < 5 then firesound
p = 0
AUDV0 = 0: AUDC0 = 0: AUDF0 = 0
goto main