set romsize 4k set smartbranching on a = -1 b = 0 c = 0 w = 30 x = 31 y = 0 z = 1 player0x = 76 player0y = 20 player1x = 80 player1y = 88 scorecolor = $0E const pfscore = 1 gosub __player_ship__ data _color_cycle $0E, $1E, $36, $42 end __attract__ COLUPF = $56 COLUP0 = $68 COLUP1 = $AC NUSIZ0 = $07 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 a = -a if player0x = 0 then a = 1 if player0x = 127 then a = -1 player0x = player0x + a a = -a if player1x = 3 then a = 1 if player1x = 151 then a = -1 player1x = player1x + a if switchreset || joy0fire then goto __start__ drawscreen goto __attract__ __start__ pfclear player0x = 76 player0y = 0 player1x = 80 player1y = 88 missile0y = 0 missile1y = 0 a = 0 b = 0 c = 0 m = 0 score = 0 pfscorecolor = $AC pfscore1 = %00000101 pfscore2 = %00000000 __start_loop__ COLUP0 = $68 COLUP1 = $AC NUSIZ0 = $07 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 a = a + 1 if a = 5 then player0y = player0y + 1 : a = 0 if player0y = 20 then a = -1 : goto __game__ drawscreen goto __start_loop__ __game__ missile0y = 12 missile0height = 5 missile1y = 87 missile1height = 4 ballx = 64 bally = 0 ballheight = 3 CTRLPF = $21 __game_loop__ if joy1fire then m = 1 if switchreset then goto __start__ if switchbw then goto __pause__ COLUPF = $56 COLUP0 = $68 COLUP1 = $AC NUSIZ0 = $07 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 if player0x = 0 then a = 1 if player0x = 127 then a = -1 if m = 0 then player0x = player0x + a if m = 1 && joy1left && player0x > 0 then player0x = player0x - 1 if m = 1 && joy1right && player0x < 127 then player0x = player0x + 1 if player1x > player0x + 9 && player1x < player0x + 15 && missile0y = 12 && m = 0 then missile0y = 13 if m = 1 && joy1fire && missile0y = 12 then missile0y = 13 if missile0y > 12 && missile0y < 89 then missile0y = missile0y + 2 if missile0y > 88 then missile0y = 12 if missile0y = 12 then missile0x = player0x + 16 if joy0left && player1x > 3 then player1x = player1x - 1 if joy0right && player1x < 151 then player1x = player1x + 1 if joy0fire && missile1y = 87 then missile1y = 86 if missile1y < 87 && missile1y > 0 then missile1y = missile1y - 2 if missile1y < 1 then missile1y = 87 if missile1y = 87 then missile1x = player1x + 4 if bally > 0 && bally < 89 then bally = bally + 1 if bally > 88 then bally = 0 gosub __move_shields__ drawscreen if collision(playfield,missile1) then missile1y = 87 if collision(player1,missile0) then goto __player_hit__ if collision(player0,missile1) && bally = 0 then gosub __galactopus_hit__ if collision(missile1,ball) && !switchleftb then bally = 0 : missile1y = 87 if collision(player1,ball) then pfscore2 = pfscore2*2|1 : bally = 0 : score = score + 10 goto __game_loop__ __move_shields__ pfhline w 3 x off pfhline y 4 z off if w > 0 then w = w - 1 if w < 21 then x = x - 1 if x = 1 then w = 31 : x = 31 if z < 31 then z = z + 1 if z > 10 then y = y + 1 if y = 31 then y = 0 : z = 0 pfhline w 3 x on pfhline y 4 z on return __galactopus_hit__ if pfscore2 = %11111111 then goto __galactopus_dies__ missile1y = 87 bally = 18 ballx = missile1x - 2 score = score + 50 return __galactopus_dies__ pfhline w 3 x off pfhline y 4 z off d = 0 e = 0 __galactopus_death_loop__ COLUPF = $56 NUSIZ0 = $07 COLUP1 = $AC missile0y = 0 missile1y = 0 d = d + 1 e = e + 1 if e > 4 then e = 1 COLUP0 = _color_cycle[e] drawscreen if d < 60 then goto __galactopus_death_loop__ score = score + 100 pfscore2 = %00000000 player0x = 76 player0y = 0 player1x = 80 goto __start_loop__ __player_hit__ gosub __explosion__ missile0y = 12 missile0x = player0x + 16 missile1y = 0 d = 0 e = player1x - 4 f = player1x - 8 g = 0 h = player1x __player_hit_loop__ COLUPF = $56 COLUP0 = $68 NUSIZ0 = $07 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 d = d + 1 g = g + 1 if g > 4 then g = 1 COLUP1 = _color_cycle[g] if d > 4 then NUSIZ1 = $05 : player1x = e if d > 7 then NUSIZ1 = $07 : player1x = f if d > 18 then NUSIZ1 = $05 : player1x = e if d > 30 then NUSIZ1 = $00 : player1x = h if d > 40 then player1y = 107 if bally > 0 && bally < 89 then bally = bally + 1 if bally > 88 then bally = 0 gosub __move_shields__ drawscreen if d < 75 then goto __player_hit_loop__ if pfscore1 = 0 then goto __game_over__ player1y = 88 player1x = 80 missile1y = 87 gosub __player_ship__ pfscore1 = pfscore1/4 goto __game_loop__ __game_over__ pfhline w 3 x off pfhline y 4 z off missile0y = 0 player1x = 50 d = 0 gosub __city__ __galactopus_descends__ COLUP0 = $68 NUSIZ0 = $07 NUSIZ1 = $06 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 d = d + 1 if player0x < 76 && d = 3 then player0x = player0x + 1 if player0x > 76 && d = 3 then player0x = player0x - 1 if player0y < 75 && d = 3 then player0y = player0y + 1 : d = 0 if player0y > 74 && player1y > 88 && d = 3 then player1y = player1y - 1 : d = 0 drawscreen if player1y > 88 then goto __galactopus_descends__ d = 0 e = 0 __earth_dies__ COLUP0 = $68 NUSIZ0 = $07 NUSIZ1 = $06 if b = 0 then on c gosub __galactopus0__ __galactopus1__ __galactopus2__ __galactopus3__ b = b + 1 if b = 8 then b = 0 d = d + 1 e = e + 1 if e > 4 then e = 1 COLUBK = _color_cycle[e] if d = 20 then player1y = 0 : gosub __player_ship__ if d > 30 then COLUBK = $00 if d > 30 && joy0fire then goto __start__ drawscreen if d < 240 then goto __earth_dies__ player0x = 76 player0y = 20 player1x = 80 player1y = 88 goto __attract__ __pause__ if !switchbw then goto __game_loop__ drawscreen goto __pause__ __player_ship__ player1: %10000010 %10111010 %11111110 %10111010 %10010010 %00010000 end return __explosion__ player1: %00011000 %01010100 %01101010 %10100101 %01011010 %00101000 end return __city__ player1: %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %11110111 %00000111 %01011111 %01011111 %01011111 %01011111 %01000000 %01111100 %01111100 %00111000 %00010000 end return __galactopus0__ player0: %00001000 %00010100 %10000010 %01000100 %00101000 %00010000 %00100100 %01011010 %10011001 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 1 return __galactopus1__ player0: %00000000 %00011000 %00000100 %11000010 %00101100 %00010000 %00000100 %01111011 %10011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 2 return __galactopus2__ player0: %00010000 %00001100 %00000010 %00000100 %11101000 %00010000 %00000111 %10111000 %01011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 3 return __galactopus3__ player0: %00011000 %00000100 %00000010 %01000100 %10101000 %00010000 %00100101 %11011010 %00011000 %00011000 %00011000 %00111100 %00111100 %00111100 %00100100 %00111100 %00111100 %00111100 %00011000 %00011000 end c = 0 return