HOME | DD

patomite — ATARI2600 Killbots

Published: 2023-07-09 17:57:26 +0000 UTC; Views: 226; Favourites: 1; Downloads: 1
Redirect to original
Description  rem Generated 09/07/2023 13:10:23 by Visual bB Version 1.0.0.554
 rem **********************************
 rem *                      *
 rem *                   *
 rem *                        *
 rem *                  *
 rem *                       *
 rem **********************************

 rem configuracao geral ( tamanho da rom sistemar de cor  da tv )

 set tv ntsc
 set romsize 4k
 set smartbranching on

 rem titulo

title

 playfield:
 ................................
 ................................
 ..XX........X..X................
 ..XX..XX....XX.XX.......XXXXX...
 ..XX.XX..X..XX.XX.X.......XX.XXX
 ..XXXX...XX.XX.XX.XXX.XXX.XX.XX.
 ..XX.XX..XX.XX.XX.X.X.X.X.XX..XX
 ..XX..XX.XX.XX.XX.XXX.XXX.XX.XXX
 ................................
 ................................
 ................................
end




 rem cor do titulo e fundo da tela

 COLUBK = 180
 COLUPF = $90
 drawscreen

 rem quando finalizar o game esconder os personagens fora da tela

 player0x = 1 : player0y = 1
 player1x = 1 : player1y = 1

 rem se o acionado o botao de tiro pular o titulo

 if joy0fire || joy1fire then goto skiptitle

 rem se nao acionado o botao de tiro permanecer no titulo

 goto title

 rem inicio do loop principal

skiptitle

 rem tela de jogo inicial (apos o titulo )


 playfield:
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 ................................
 ................................
 XXX...XXXXXXXXXXXXXXXXXXX...XXXX
 ...X...X...............X...X....
 ....X...X.............X...X.....
 .....X...X...........X...X......
 XXXXXXX...XXXXXXXXXXX...XXXXXXXX
 ................................
 ................................
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end



startposx
 player1x = rand
 if player1x > 150 then goto startposx
startposy
 player1y = rand
 if player1y > 100 then goto startposy

 rem posicao dos personagens na tela

 player0x = 75 : player0y = 80
 player1x = 80 : player1y = 1

 rem configuraão do missil saindo do heroi

 missile0height = 4  : missile0y = 255

 rem cor do fundo da tela

 COLUBK = 216

 rem configuracao das contagens de pontos e cor do score

 score = 00000 :  scorecolor = $0E
 m = 0

 rem loop principal

main

 rem cor dos personagens e da base do canhao (heroi)

 COLUP1 = $40
 COLUP0 = $00
 COLUPF = $90
 f=f+1
 g=g+1

 rem heroi robot

 if f=10 then player0:

 %00111110
 %00011100
 %00110000
 %00111100
 %00011110
 %00111001
 %01110100
 %00111000

end

 rem vilao

 if g=10 then player1:

 %00000000
 %00000000
 %01111110
 %11111111
 %11111111
 %01111110
 %00000000
 %00000000
end
end

 if f=10 then f=0
 if g=10 then g=0

 rem velocidade que o vilao ataca o heroi

 a = a + 1 : if a < 1 then goto checkfire
 a = 0

 rem forma que o vilao persegue o heroi

 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 verificando se o tiro saiu do heroi

checkfire
 if missile0y>240 then goto skip
 missile0y = missile0y - 2 : goto draw

skip
 rem tiro emitido inicia o jogo e sons de fundo e disparo  
 if joy0fire then missile0ylayer0y-2:missile0xlayer0x+4: goto firesound

draw
 drawscreen

 rem se o tiro acertar o vilao somar pontos ordem crescente surgir outro vilao na tela e som de vilao abatido

 if collision(missile0,player1) then score=score+1layer1x=rand/2layer1y=0:missile0y=255 : goto pointsound

 rem se o vilao encostar no heroi som de explosao retorna para o titulo

 if collision(player0,player1) goto deadsound : then title


 rem configuracao de limite de tela

 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

 rem configuracao de movimentos do heroi

 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 fim do loop principal


  rem configuracao de sons do jogo

  rem som dos pontos ( quando o vilao morre)

pointsound
 AUDV0 = 15
 AUDC0 =8
 AUDF0 = 3

  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 tiro

firesound
 AUDV0 = 15
 AUDC0 =8
 AUDF0 = 18

  rem som de fundo (fica mis facil configurar aqui no tiro)

 AUDV1 = 10
 AUDC1 =  2
 AUDF1 = 31

    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

 rem Som do heroi morredo
deadsound
 AUDV1 = 15
 AUDC1 = 8
 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 fim da programacao  ( Canal Mundo4k)
Related content
Comments: 0