set romsize 8k set tv ntsc60 const noscore = 1 const pfscore = 1 __Start_Restart rem "Define ghost count for each player." q = 0: r = 0 rem "Define ghost bullet count for each player." s = 0: t = 0 rem "Define a random number generator." u = 0 rem "Define death bar for each player." pfscore1 = 0 pfscore2 = 0 rem "Begin game coding." bally = 200 COLUBK = $1E __Get_Ready drawscreen if !switchreset then goto __Get_Ready rem "Define players 1 and 2 to switch between them on sprite 1 rapidly." a = 10: b = 40: c = 140: d = 40 rem "Define up to 3 ghosts per player." f = 200: h = 200: j = 200: l = 200: n = 200: p = 200 COLUBK = $1E player0: %00111100 %01000010 %10111101 %11111111 %11111111 %11111111 %01011010 %00111100 end player1: %10100101 %11111111 %11111111 %11111111 %11111111 %11111111 %11011011 %01111110 end COLUPF = $C4 __Main_Loop if joy0up then b = b - 2 if joy0down then b = b + 2 if joy0left then a = a - 2 if joy0right then a = a + 2 if a < 10 then a = 140 if b < 10 then b = 80 if a > 140 then a = 10 if b > 80 then b = 10 COLUP0 = $34 COLUP1 = $2C player0x = a player0y = b if !joy1fire then goto __Skip_Add_A if s = 0 then goto __Skip_Add_A if q > 0 then goto __Skip_Add_A q = 1 s = 0 w = rand&3 if w = 0 then e = a + 10 if w = 1 then e = a + 10 if w = 2 then e = a - 10 if w = 3 then e = a - 10 if w = 0 then f = b + 10 if w = 1 then f = b - 10 if w = 2 then f = b + 10 if w = 3 then f = b - 10 __Skip_Add_A if q = 0 then goto __Skip_Ghost_A if e > a then e = e - 1 if e < a then e = e + 1 if f > a then f = f - 1 if f < a then f = f + 1 if e < 10 then e = 140 if f < 10 then f = 80 if e > 140 then e = 10 if f > 80 then f = 10 __Skip_Ghost_A player1x = e player1y = f drawscreen if collision(player0, player1) then goto __Ghost_Hit_0 if !joy1fire then goto __Skip_Add_B if s = 0 then goto __Skip_Add_B if q > 1 then goto __Skip_Add_B q = 2 s = 0 w = rand&3 if w = 0 then g = a + 10 if w = 1 then g = a + 10 if w = 2 then g = a - 10 if w = 3 then g = a - 10 if w = 0 then h = b + 10 if w = 1 then h = b - 10 if w = 2 then h = b + 10 if w = 3 then h = b - 10 __Skip_Add_B if q = 0 then goto __Skip_Ghost_B if g > a then g = g - 1 if g < a then g = g + 1 if h > a then h = h - 1 if h < a then h = h + 1 if g < 10 then g = 140 if h < 10 then h = 80 if g > 140 then g = 10 if h > 80 then h = 10 __Skip_Ghost_B player1x = g player1y = h drawscreen if collision(player0, player1) then goto __Ghost_Hit_0 if !joy1fire then goto __Skip_Add_C if s = 0 then goto __Skip_Add_C if q > 2 then goto __Skip_Add_C q = 3 s = 0 w = rand&3 if w = 0 then i = a + 10 if w = 1 then i = a + 10 if w = 2 then i = a - 10 if w = 3 then i = a - 10 if w = 0 then j = b + 10 if w = 1 then j = b - 10 if w = 2 then j = b + 10 if w = 3 then j = b - 10 __Skip_Add_C if q = 0 then goto __Skip_Ghost_C if i > a then i = i - 1 if i < a then i = i + 1 if j > a then j = j - 1 if j < a then j = j + 1 if i < 10 then i = 140 if j < 10 then j = 80 if i > 140 then i = 10 if j > 80 then j = 10 __Skip_Ghost_C player1x = i player1y = j drawscreen if collision(player0, player1) then goto __Ghost_Hit_0 if collision(player0, ball) then goto __Ball_Collect_0 goto __Next_Player __Ghost_Hit_0 pfscore1 = 255 goto __Start_Restart __Ball_Collect_0 s = 1 bally = 200 __Next_Player if joy1up then d = d - 2 if joy1down then d = d + 2 if joy1left then c = c - 2 if joy1right then c = c + 2 if c < 10 then c = 140 if d < 10 then d = 80 if c > 140 then c = 10 if d > 80 then d = 10 COLUP0 = $72 COLUP1 = $2C player0x = c player0y = d if !joy0fire then goto __Skip_Add_D if t = 0 then goto __Skip_Add_D if r > 0 then goto __Skip_Add_D r = 1 t = 0 w = rand&3 if w = 0 then k = a + 10 if w = 1 then k = a + 10 if w = 2 then k = a - 10 if w = 3 then k = a - 10 if w = 0 then l = b + 10 if w = 1 then l = b - 10 if w = 2 then l = b + 10 if w = 3 then l = b - 10 __Skip_Add_D if r = 0 then goto __Skip_Ghost_D if k > a then k = k - 1 if k < a then k = k + 1 if l > a then l = l - 1 if l < a then l = l + 1 if k < 10 then k = 140 if l < 10 then l = 80 if k > 140 then k = 10 if l > 80 then l = 10 __Skip_Ghost_D player1x = k player1y = l drawscreen if collision(player0, player1) then goto __Ghost_Hit_1 if !joy1fire then goto __Skip_Add_E if t = 0 then goto __Skip_Add_E if r > 1 then goto __Skip_Add_E r = 2 t = 0 w = rand&3 if w = 0 then m = a + 10 if w = 1 then m = a + 10 if w = 2 then m = a - 10 if w = 3 then m = a - 10 if w = 0 then n = b + 10 if w = 1 then n = b - 10 if w = 2 then n = b + 10 if w = 3 then n = b - 10 __Skip_Add_E if r = 0 then goto __Skip_Ghost_E if m > a then m = m - 1 if m < a then m = m + 1 if n > a then n = n - 1 if n < a then n = n + 1 if m < 10 then m = 140 if n < 10 then n = 80 if m > 140 then m = 10 if n > 80 then n = 10 __Skip_Ghost_E player1x = m player1y = n drawscreen if collision(player0, player1) then goto __Ghost_Hit_1 if !joy0fire then goto __Skip_Add_F if t = 0 then goto __Skip_Add_F if r > 2 then goto __Skip_Add_F r = 3 t = 0 w = rand&3 if w = 0 then o = a + 10 if w = 1 then o = a + 10 if w = 2 then o = a - 10 if w = 3 then o = a - 10 if w = 0 then p = b + 10 if w = 1 then p = b - 10 if w = 2 then p = b + 10 if w = 3 then p = b - 10 __Skip_Add_F if r = 0 then goto __Skip_Ghost_F if o > a then o = o - 1 if o < a then o = o + 1 if p > a then p = p - 1 if p < a then p = p + 1 if o < 10 then o = 140 if p < 10 then p = 80 if o > 140 then o = 10 if p > 80 then p = 10 __Skip_Ghost_F player1x = o player1y = p drawscreen if collision(player0, player1) then goto __Ghost_Hit_1 if collision(player0, ball) then goto __Ball_Collect_1 goto __Ball_Spawner __Ghost_Hit_1 pfscore2 = 255 goto __Start_Restart __Ball_Collect_1 t = 1 bally = 200 __Ball_Spawner w = rand if w = 1 then ballx = (rand + 10) & 127 if w = 1 then bally = 40 goto __Main_Loop