COLUPF=rand COLUBK=rand include div_mul.asm missile1height = 2 missile0height = 2 mainMenu playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX............................XX XX......XX...X..XX..X.X.......XX XX......X.X.X.X.X.X.X.X.......XX XX......XX..XXX.XX...X........XX XX......X.X.X.X.X.X..X........XX XX......XX..X.X.XX...X........XX XX............................XX XX............................XX XX............................XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if joy0fire then goto gameStart if switchreset then COLUPF= rand: COLUBK= rand lives=96 lifecolor=$00 drawscreen goto mainMenu gameStart rem a describes cute state. b describes room state a = 0 b = 1 player1y=(rand&55)+25 player0: %00110110 %00100100 %10111100 %01111111 %00000110 %00000110 %00000000 end player0y=50 player0x=50 missile0x=24 missile0y=(rand&55)+25 missile1x=100 missile1y=player1y rem f is slope of missile 1 f = (rand&10)+1 goto rightRoom pause if joy0fire goto button drawscreen goto pause button if b=1 goto pauseReturn1 if b=2 goto pauseReturn2 if b=3 goto pauseReturn3 deathBehavior b=1 a=0 lives=lives-32: score=score-5 if lives<32 then score=0: goto mainMenu goto gameStart movementNotCute if player0x=130 then goto 2 if joy0right then player0x=player0x+1 if joy0right then player0: %00110110 %00100100 %10111100 %01111111 %00000110 %00000110 %00000000 end 2 if player0x=24 then goto 1 if joy0left then player0x=player0x-1 if joy0left then player0: %01101100 %00100100 %00111101 %11111110 %01100000 %01100000 %00000000 end 1 if player0y=11 then goto 3 if joy0up then player0y=player0y-1 3 if player0y=80 then goto 4 if joy0down then player0y=player0y+1 4 if b=1 then goto movementReturn1 if b=2 then goto movementReturn2 if b=3 then goto movementReturn3 movementCute if player0x=130 then goto 22 if joy0right then player0x=player0x+1 if joy0right then player0: %00110110 %00100100 %00111100 %01111111 %10000110 %00001111 %00001001 end 22 if player0x=24 then goto 11 if joy0left then player0x=player0x-1 if joy0left then player0: %01101100 %00100100 %00111100 %11111110 %01100001 %11110000 %10010000 end 11 if player0y=11 then goto 33 if joy0up then player0y=player0y-1 33 if player0y=80 then goto 44 if joy0down then player0y=player0y+1 44 if b=1 then goto movementReturn1 if b=2 then goto movementReturn2 if b=3 then goto movementReturn3 comingB1 player0x=25 player1y=(rand&55)+25 missile0x=24 missile0y=(rand&55)+25 rem c is the slope of missile 0 d=missile1y-player0y e=missile1x-player0x c = d / e missile1x=100 missile1y=player1y rem f is slope of missile 1 f = (rand&10)+1 rightRoom if switchreset then COLUPF= rand: COLUBK= rand b = 1 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..............................XX ..............................XX ..............................XX ..............................XX ..............................XX ..............................XX ..............................XX ..............................XX ..............................XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end player1: %01111100 %00111100 %00001100 %00001100 %00001100 %00001100 %00001100 %00001100 %01111100 %11101100 %00010010 %00100011 %00111011 %00101111 %00011110 %00001100 end player1x=100 if collision(player0, player1) && player0x=100 && a=0 then a = 1: score=score+10 if a=0 then goto movementNotCute if a=1 then goto movementCute movementReturn1 if joy0fire goto pause pauseReturn1 if player0x=24 then goto comingB2right missile1x=missile1x-1 missile1y=player1y if missile1x<24 then player1y=(rand&55)+25: missile1x=100: score=score+1 if missile1x>130 then player1y=(rand&55)+25: missile1x=100: score=score+1 if missile1y<11 then player1y=(rand&55)+25: missile1x=100: score=score+1 if missile1y>80 then player1y=(rand&55)+25: missile1x=100: score=score+1 missile0x=missile0x+1 if missile0x<24 then missile0y=player0y: missile0x=24: score=score+1 if missile0x>130 then missile0y=player0y: missile0x=24: score=score+1 if missile0y<11 then missile0y=player0y: missile0x=24: score=score+1 if missile0y>80 then missile0y=player0y: missile0x=24: score=score+1 drawscreen goto rightRoom comingB2right missile0x=24 missile0y=(rand&55)+25 missile0x=130 missile0y=(rand&55)+25 player0x=129 player1y=(rand&55)+25 player1x=(rand&80)+45 goto middleRoom comingB2left player0x=25 player1y=(rand&55)+25 player1x=(rand&80)+45 goto middleRoom middleRoom if switchreset then COLUPF= rand: COLUBK= rand b = 2 player1: %01000010 %10100101 %01011010 %00100100 %00011000 %00001000 %00010000 %00001000 end playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end if player0x>125 then goto saveMe if player0x<30 then goto saveMe if collision(player0, player1) then goto deathBehavior saveMe if joy0fire goto pause pauseReturn2 if a=0 then goto movementNotCute if a=1 then goto movementCute movementReturn2 if player0x=130 then goto comingB1 if player0x=24 then goto comingB3 missile1x=missile1x-1 missile1y=player1y if missile1x<24 then missile1x=130: score=score+1 if missile1x>130 then missile1x=130: score=score+1 if missile1y<11 then missile1x=130: score=score+1 if missile1y>80 then missile1x=130: score=score+1 missile0x=missile0x+1 if missile0x<24 then missile0y=player0y: missile0x=24: score=score+1 if missile0x>130 then missile0y=player0y: missile0x=24: score=score+1 if missile0y<11 then missile0y=player0y: missile0x=24: score=score+1 if missile0y>80 then missile0y=player0y: missile0x=24: score=score+1 drawscreen goto middleRoom comingB3 player0x=129 player1y=(rand&55)+25 player1x=50 player1: %10010010 %01010100 %00101000 %00101000 %00101000 %00010111 %00101010 %00111000 %01011111 %01111010 %10010100 %10101010 %10110110 %10101010 %01010100 %00111000 end leftRoom if switchreset then COLUPF= rand: COLUBK= rand playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX.............................. XX.............................. XX.............................. XX.............................. XX.............................. XX.............................. XX.............................. XX.............................. XX.............................. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end b = 3 if collision(player0, player1) && a=0 then goto deathBehavior if joy0fire goto pause pauseReturn3 if a=0 then goto movementNotCute if a=1 then goto movementCute movementReturn3 if player0x=130 then goto comingB2left missile1x=missile1x+1 missile1y=player1y if missile1x<24 then player1y=player0y: missile1x=50: score=score+1 if missile1x>130 then player1y=player0y: missile1x=50: score=score+1 if missile1y<11 then player1y=player0y: missile1x=50: score=score+1 if missile1y>80 then player1y=player0y: missile1x=50: score=score+1 missile0x=missile0x-1 if missile0x<24 then missile0y=(rand&55)+25: missile0x=130: score=score+1 if missile0x>130 then missile0y=(rand&55)+25: missile0x=130: score=score+1 if missile0y<11 then missile0y=(rand&55)+25: missile0x=130: score=score+1 if missile0y>80 then missile0y=(rand&55)+25: missile0x=130: score=score+1 drawscreen goto leftRoom