set kernel_options pfheights player1colors set romsize 8k const player0colors=0 const noscore=1 NUSIZ0=$00 : NUSIZ1=$00 : CTRLPF=$01 pacman_setup playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ...XX..XX..XX..XX..XX..XX..XX... ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ XXX...XXX...XXX...X............. X.....X.X....X....X............. XXX...XXX....X....X............. X.....X.X....X.................. XXX...X.X....X....X............. ................................ end pfheights: 8 3 2 3 4 20 8 8 8 8 8 8 end player0: %00111100 %01111110 %11111111 %11111111 %11111111 %01101110 %00111100 end d=4 : e=$18 pacman_start_tune c=c+1 AUDF0=d : AUDF1=e AUDC0=4 : AUDC1=4 AUDV0=8 : AUDV1=8 COLUBK=$84 : COLUPF=$f6 : COLUP0=$1A drawscreen player0x=17 : player0y=15 if c>15 && c<32 then d=$0c : e=$14 if c>31 && c<48 then d=$4 : e=$18 if c>48 && c<64 then d=$08 : e=$14 if c>63 then c=0 : d=0 : e=0 : goto pacman_main goto pacman_start_tune pacman_main CTRLPF=$01 AUDV1=0 if !d{0} then AUDV0=0 a=a+1 if a=8 then b=1 if a=16 then b=2 if a=24 then b=3 if a=32 then b=2 if a=40 then a=0 COLUBK=$84 : COLUPF=$f6 : COLUP0=$1A player0: %00111100 %01111110 %11111111 %11111111 %11111111 %01101110 %00111100 end if b=2 then player0: %00111100 %01111110 %11111111 %11100000 %11111111 %01101110 %00111100 end if b=3 then player0: %00111000 %01111110 %11100000 %11000000 %11100000 %01101100 %00111000 end f=(player0x-17)/4 g=f+4 if joy0left then d{1}=1 : d{2}=0 if joy0right then d{2}=1 : d{1}=0 if d{1} then REFP0=8 if d{2} then REFP0=0 if d{1} && player0x>17 then player0x=player0x-1 if d{2} && player0x<136 then player0x=player0x+1 if player0x>134 then goto et_setup if !d{0} && collision(player0,playfield) then c=10 : AUDF0=9 : AUDC0=9 : d{0}=1 if collision(player0,playfield) then pfhline f 2 g off if d{0} then AUDV0=c : c=c-1 if d{0} && c=0 then d{0}=0 drawscreen goto pacman_main et_setup playfield: XX............................XX XXX..........................XXX XXXX........................XXXX XXXXX......................XXXXX XXXXXX....................XXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...X...X...XXXXXX...X.X.X...X.X X.XXX.XXXX.XXXXXXX.X.X.X.XX.XX.X X.X.X...XX.XXXXXXX.X.X.X.XX.XX.X X.X.X.XXXX.XXXXXXX.X.X.X.XX.XXXX X...X...XX.XXXXXXX...X...XX.XX.X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end pfheights: 8 4 16 12 16 4 4 4 4 4 4 4 end a=$17 : b=1 d{1}=1 player0x=78 : player0y=56 player0: %11100111 %01100011 %00101011 %10111111 %11111111 %00011111 %00001111 %11000011 %11111111 %10111111 %11111110 end et_main if player0y<8 then goto adventure_setup if !joy0left && !joy0right && !d{1} then b=0 if joy0left && player0x>50 then e=e+1 : d{3}=0 if e>1 then e=0 : player0x=player0x-1 : b=b+1 : d{2}=1 if joy0right && player0x<100 then f=f+1 : d{3}=0 if f>1 then f=0 : player0x=player0x+1 : b=b+1 : d{2}=0 if joy0fire && !d{1} then player0y=55 : d{5}=1 : d{1}=1 : b=0 if d{1} && joy0up then d{5}=0 : d{6}=1 : g=g+1 : k=k+1 : m=m+1 if k>2 then k=0 : player0y=player0y-1 if d{1} && joy0down then d{5}=0 : d{6}=1 : g=g+1 : l=l+1 : m=m+1 if l>2 then l=0 : player0y=player0y+1 if d{1} && player0y=56 then d{1}=0 : d{5}=0 : d{6}=0 : a=$17 : g=0 : m=0 : n=0 COLUBK=6 : COLUPF=0 : COLUP0=$DA if d{1} then n=(g+4)/8 if d{5} then h=$0E : i=$0E : j=$03 if g=8 then j=$07 if g=16 then j=$0b if g=24 then j=$0f if g>31 then g=32 : j=0 if d{5} then g=g+1 : a=0 if d{6} then m=m+1 if m>72 then h=$1c : i=$1c : j=$04 if m>76 then m=0 : j=$00 if d{5} || d{6} then goto et_ds if b{1} && !d{3} then a=a+1 : h=a : n=0 : i=$09 : j=$07 : d{3}=1 et_ds AUDF1=h : AUDC1=i : AUDV1=j drawscreen j=0 if a>$19 then a=$17 if d{2} then REFP0=0 else REFP0=8 if b>11 then b=0 if n=0 && b<3 then player0: %11100111 %01100011 %00101011 %10111111 %11111111 %00011111 %00001111 %11000011 %11111111 %10111111 %11111110 end if n=0 && b>3 && b<8 then player0: %00000111 %11100011 %01100001 %00100000 %10111110 %11111111 %00011111 %00001111 %11000011 %11111111 %10111111 %11111110 end if n=0 && b>7 then player0: %11100000 %01100000 %00100000 %10111111 %11111111 %00011111 %00001111 %11000011 %11111111 %10111111 %11111110 end if n=1 then player0: %11100111 %01100011 %00101011 %10111111 %11111111 %00011111 %00001111 %00000011 %00000011 %11000011 %11111111 %10111111 %11111110 end if n=2 then player0: %11100111 %01100011 %00101011 %10111111 %11111111 %00011111 %00001111 %00000011 %00000011 %00000011 %11000011 %11111111 %10111111 %11111110 end if n=3 then player0: %11100111 %01100011 %00101011 %10111111 %11111111 %00011111 %00001111 %00000011 %00000011 %00000011 %00000011 %11000011 %11111111 %10111111 %11111110 end goto et_main adventure_setup playfield: XXXXXX.X.X.X........X.X.X.XXXXXX X....XXXXXXX........XXXXXXX....X X....XXXXXXX........XXXXXXX....X X......XXXXXXXXXXXXXXXXXX......X X......XXXXXXXXXXXXXXXXXX......X X........XXXXXXXXXXXXXX........X X..........XXX....XXX..........X X..........XXX....XXX..........X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end pfheights: 8 6 6 6 6 20 6 6 6 6 6 end b=0 : c=255 : d=0 : e=0 player0: %1010101 %1111111 %1010101 %1111111 %1010101 %1111111 %1010101 %1111111 %1010101 %1111111 %1010101 %1111111 end player1: %11100101 %10111111 %11100000 end player1color: $1a $1a $1a end player1x=24 : player1y=20 player0x=76 : player0y=63 ballx=78 : bally=70 adventure_main COLUBK=$08 : COLUPF=$1A : COLUP0=0 CTRLPF=$25 : ballheight=3 if joy0left then x=255 if joy0right then x=1 if joy0up then y=255 if joy0down then y=1 ballx=ballx+x : bally=bally+y if collision(player1,ball) && !b{0} && !b{1} then c=3 : b{0}=1 if b{0} && c<255 then d=d+1 : AUDF0=c : AUDC0=6 if d>2 then d=0 : c=c-1 if b{0} && c=0 then c=255 : b{1}=1 if b{1} then player1x=ballx : player1y=bally-8 if joy0fire && b{1} then b{0}=0 : b{1}=0 : b{2}=1 : c=0 : d=0 if b{2} then d=d+1 : AUDF0=c : AUDC0=6 if d>2 then d=0 : c=c+1 if b{2} && c>3 then c=255 : b{1}=0 : b{2}=0 if !b{3} && collision(player0,player1) then b{3}=1 if b{3} then e=e+1 if e>7 && b{3} then player0y=player0y-2 : e=0 if player0y<44 then score=5 : goto combat_setup bank2 if c=255 then AUDV0=0 else AUDV0=5 drawscreen if collision(ball, playfield) || collision(ball, player0) then ballx=ballx-x : bally=bally-y x=0 : y=0 goto adventure_main bank 2 combat_setup playfield: ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X..............................X X...XX.X.X.XXX.XXX.XXX.........X X...X..XXX.X.X.X.X..X..........X X..XX..X.X.XXX.XXX..X..........X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end pfheights: 16 4 8 8 8 8 8 8 8 8 4 end player1: %11111100 %11111100 %00111000 %00111111 %00111000 %11111100 %11111100 end b=0 player1x=30 : player1y=48 player0x=130 : player0y=48 combat_main if joy0left then c=c+1 if c>10 then c=0 : b=b-1 if joy0right then e=e+1 if e>10 then e=0 : b=b+1 if b=16 then b=0 if b=255 then b=15 REFP1=0 if b>4 && b<9 then REFP0=8 if b>8 && b<13 then REFP0=8 if b=0 || b=8 then player0: %11111110 %11111110 %00111000 %00111111 %00111000 %11111110 %11111110 end if b=1 || b=7 then player0: %00011100 %01111000 %11111011 %01111100 %00011100 %00011110 %00111100 %00011000 end if b=2 || b=6 then player0: %00011001 %00111010 %01111100 %11111111 %11011111 %00001110 %00011100 %00011000 end if b=3 || b=5 then player0: %00100100 %01100100 %01111101 %11111111 %11111111 %01001110 %00001110 %00000100 end if b=4 then player0: %0001000 %0001000 %1101011 %1111111 %1111111 %1100011 %1100011 end if b=9 || b=15 then player0: %00011000 %00111100 %00011110 %00011100 %01111100 %11111011 %01111000 %00011100 end if b=10 || b=14 then player0: %00011000 %00011100 %00001110 %11011111 %11111111 %01111100 %00111010 %00011000 end if b=11 || b=13 then player0: %00000100 %00001110 %01001110 %11111111 %11111111 %01111101 %01100100 %00100100 end if b=12 then player0: %1100011 %1100011 %1111111 %1111111 %1111111 %1101011 %1101011 %0001000 end player1color: $44 $44 $44 $44 $44 $44 $44 $44 end COLUP0=$82 COLUPF=$3C COLUBK=$EA if joy0up then w=w+1 if w>4 then w=0 : AUDF0=$05 : gosub combat_directions player0x=player0x-x : player0y=player0y-y drawscreen AUDF1=$1f : AUDC1=2 : AUDV1=8 if !a{1} then AUDF0=$1d : AUDC0=2 : AUDV0=8 else v=v-1 : AUDC0=8 : AUDV0=v : AUDF0=$0f if v=0 then a{1}=0 : v=15 if !a{0} then missile0x=player0x+4 : missile0y=player0y-4 if joy0fire then a{0}=1 : a{1}=1 if a{0} then gosub combatmissile_directions if collision(player0,playfield) then player0x=player0x+x : player0y=player0y+y x=0 : y=0 goto combat_main combatmissile_directions if b<4 then missile0x=missile0x+1 if b=1 then missile0x=missile0x+1 : missile0y=missile0y+1 if b=2 then missile0y=missile0y+1 if b=3 then missile0y=missile0y+2 if b>3 && b<8 then missile0y=missile0y+1 if b=5 then missile0x=missile0x-1 : missile0y=missile0y+1 if b=6 then missile0x=missile0x-1 if b=7 then missile0x=missile0x-2 if b>7 && b<12 then missile0x=missile0x-1 if b=9 then missile0x=missile0x-1 : missile0y=missile0y-1 if b=10 then missile0y=missile0y-1 if b=11 then missile0y=missile0y-2 if b>11 && b<16 then missile0y=missile0y-1 if b=13 then missile0y=missile0y-1 : missile0x=missile0x+1 if b=14 then missile0x=missile0x+1 if b=15 then missile0x=missile0x+2 if collision(missile0,player1) then goto yar_setup if collision(missile0,playfield) then a{0}=0 return combat_directions if b<4 then x=255 if b=1 then x=254 : y=255 if b=2 then y=255 if b=3 then y=254 if b>3 && b<8 then y=255 if b=5 then x=1 : y=254 if b=6 then x=1 if b=7 then x=2 if b>7 && b<12 then x=1 if b=9 then x=2 : y=1 if b=10 then y=1 if b=11 then y=2 if b>11 && b<16 then y=1 if b=13 then y=2 : x=255 if b=14 then x=255 if b=15 then x=254 return yar_setup pfclear a=1 : b=0 g=12 : h=3 : i=3 j=14 k=10 : l=48 player0x=150 : player0y=48 missile0x=2 : missile0y=200 m=0 yar_anim if a<3 then player1: %01000000 %01110000 %10011001 %11100110 %11100110 %10011001 %01110000 %01000000 end if a<3 && b>3 then player1: %00011100 %00010000 %10011001 %11100110 %11100110 %10011001 %00010000 %00011100 end if a=3 then player1: %00111100 %00011000 %00011000 %11100111 %10100101 %10011001 %00100100 end if a=3 && b>3 then player1: %00111100 %11011011 %01011010 %01111110 %00100100 %00100100 %00011000 %00100100 end if a=3 then player1: %00111100 %00011000 %00011000 %01111110 %11100111 %10100101 %10011001 %00100100 end if a=3 && b>3 then player1: %00111100 %11011011 %01011010 %01111110 %00100100 %00100100 %00011000 %00100100 end if a=4 then player1: %00100100 %10011001 %10100101 %11100111 %01111110 %00011000 %00011000 %00111100 end if a=4 && b>3 then player1: %00100100 %00011000 %00100100 %00100100 %01111110 %01011010 %11011011 %00111100 end player0: %00001111 %00011011 %00110011 %11100011 %11111111 %11100011 %00110011 %00011011 %00001111 end dim p1clo=player1color dim p1chi=player1color+1 NUSIZ1=$00 player1color: $7c $7c $7c $7c $7c $7c $7c $7c end if b{0} then player1x=k : player1y=l : goto yar_main datastart const datastarthi=(#>.datastart) var8=0 player1x=50 player1y=90 player1height=90 player1pointerhi=datastarthi p1chi=datastarthi player1pointerlo=rand/2 p1clo=rand/2 NUSIZ1=$05 yar_main drawscreen missile0height=4 : NUSIZ0=$30 b=b+1 : j=j+2 if b>7 then b=0 if b=0 && m{2} then player0y=player0y+1 if b=0 && !m{2} then player0y=player0y-1 if b=0 then f=f+2 if f>15 then f=2 COLUBK=0 if player0y<30 then m{2}=1 if player0y>60 then m{2}=0 if missile0x>2 then e=14 : d=12 : f=6 else d=7 : e=14 : f=2 AUDC0=d : AUDF0=e : AUDV0=f AUDC1=g : AUDF1=h : AUDV1=i COLUP0=j : COLUP1=$7c : COLUPF=$00 if joy0left && k>2 then a=1 : k=k-1 if joy0right && k<140 then a=2 : k=k+1 if joy0up then a=3 : l=l-1 if joy0down then a=4 : l=l+1 if l>88 then l=2 if l<2 then l=88 if k=2 && !m{1} then m{1}=1 if !m{1} then missile0y=200 if m{1} && !m{0} then missile0y=l if joy0fire && !m{0} then m{0}=1 if m{0} then missile0x=missile0x+1 if collision(missile0,player0) then reboot if missile0x>160 then missile0y=200 : missile0x=2 : m{0}=0 : m{1}=0 goto yar_anim