rem ***************************************************** rem ***************************************************** rem * rem * Example Program rem * rem * Shoot Missile in 8 Directions rem * rem * By Duane Alan Hahn (Random Terrain) using hints, tips, rem * and code snippets from AtariAge members such as batari, rem * SeaGtGruff, RevEng, Robert M, Atarius Maximus, and jrok. rem * rem ***************************************************** rem ***************************************************** rem * rem * About this program: rem * rem * I might turn this into a real game and possibly call it rem * Seaweed Patrol. rem * rem * You are part of an advanced underwater civilization. rem * Everyone has a job and yours is to patrol your section of the rem * ocean in a semi-organic submarine. Highly aggressive seaweed rem * surrounds you and it keeps trying to replicate faster than you can rem * shoot. Use your missiles to blast any bits of seaweed that appear rem * before they clog up your sector and spread to others, making it rem * nearly impossible for anyone to travel. Don't let the seaweed rem * strangle your civilization to extinction. rem * rem * Your ship will be damaged if you bump into the rem * seaweed, so be careful. rem * rem * If I turn this into a game, there will be an enemy or two rem * and bonus items to collect. I'll also have to figure out rem * if it's a non-stop game or if there will be rounds. rem * rem * Hit the reset switch if you want to restart the program. rem * rem ***************************************************** rem ***************************************************** rem * Kernel options. Multicolored sprite and playfield. rem * set kernel_options player1colors pfcolors rem ***************************************************** rem * Jump to a label from an if-then with no worries. rem * set smartbranching on rem ***************************************************** rem * rem * Create aliases for variables. rem * rem * You can have more than one alias for each variable. rem * If you use different aliases for bit operations, it is rem * easier to understand and remember what they do. rem * rem ***************************************************** rem * dim Master_Counter = a dim Frame_Counter = b dim Shot_X = c dim Shot_Y = d dim Shot_Moving = e dim P0_Hit_Pixel = e dim Game_Over = e dim Shot_U2 = e dim Shot_D2 = e dim Shot_L2 = e dim Shot_R2 = e dim Shot_Up = f dim Shot_Down = f dim Shot_Left = f dim Shot_Right = f dim Shot_U_Snapshot = f dim Shot_D_Snapshot = f dim Shot_L_Snapshot = f dim Shot_R_Snapshot = f dim Sound_Shot_Pixel = g dim Sound_Ship_Bounce = g dim Sound_Shoot = g dim Flip_P0 = h dim Slide_Counter = i dim Slide_Speed = j dim P0_Left_Right = player0x.k dim P0_Up_Down = player0y.l dim Rate = m dim Sound_Counter = n dim Debounce = o dim rand16 = z rem ***************************************************** rem * rem * Variable descriptions will be here in second draft. rem * rem ***************************************************** rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem * rem ***************************************************** rem * Enable pfscore bars. rem * const pfscore=1 Start_Restart rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** rem * rem * Program start/restart. rem * rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** pfclear rem ***************************************************** rem * Set up variables, colors, and so on. rem * Master_Counter = 0 : Frame_Counter = 0 : Flip_P0 = 0 : Rate=1 Slide_Counter=0 : Slide_Speed=0 : Shot_X=4 : Shot_Y=250 Shot_Moving = 0 : Shot_Up = %00000001 : Sound_Shot_Pixel= 0 missile0height=1 : player0x=80 : player0y=60 COLUBK=$80 : pfscore2=255 : pfscorecolor=$9E Debounce=20 : AUDV0=0 : score = 0 rem ***************************************************** rem * Puts sprites and missiles behind playfield pixels. rem * CTRLPF=$05 rem ***************************************************** rem * Sets the playfield colors. rem * pfcolors: $CE $CC $CC $CA $CA $C8 $C8 $C6 $C6 $C4 $C4 $C4 end goto P0_Up_00 Main_Loop rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** rem * rem * Main Loop rem * rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ***************************************************** rem * Set score color, sprite color, color of top playfield row and rem * turn on side borders. rem * scorecolor = 28 : COLUP0=10 : COLUPF = $CE : PF0 = %11110000 rem ***************************************************** rem * Increase size of missile and flip sprite if necessary. rem * NUSIZ0=$10 : REFP0=Flip_P0 rem ***************************************************** rem * rem * Controls animation speed. rem * rem ***************************************************** rem * Master_Counter=Master_Counter+1 if Master_Counter < 7 then Skip_Frame_Counter Frame_Counter=Frame_Counter+1 : Master_Counter=0 if Frame_Counter=4 then Frame_Counter=0 Skip_Frame_Counter rem ***************************************************** rem * rem * Advanced joystick reading. (Better than if-thens.) rem * rem ***************************************************** rem * temp1=SWCHA/16 on temp1 goto Slide Slide Slide Slide Slide GoDownRight GoUpRight GoRight Slide GoDownLeft GoUpLeft GoLeft Slide GoDown GoUp Slide Slide rem ***************************************************** rem * rem * Fake gravity slide. This is a simplistic cheat that does rem * not use complicated calculations. rem * rem ***************************************************** rem * rem * If it is not time to slide, skip this section. rem * if !Slide_Speed then Done_Slide rem ***************************************************** rem * If the counter doesn't match the speed, skip this section. rem * Slide_Counter=Slide_Counter + 1 if Slide_Counter < Slide_Speed then Done_Slide rem ***************************************************** rem * Speed becomes slower each time it loops back around. rem * Slide_Speed=Slide_Speed * 2 rem ***************************************************** rem * Sets up a normal slide. rem * Shot_U2{4}=Shot_Up{0} : Shot_D2{5}=Shot_Down{1} Shot_L2{6}=Shot_Left{2} : Shot_R2{7}=Shot_Right{3} rem ***************************************************** rem * Sets up a backwards slide from a bounce. rem * if !P0_Hit_Pixel{1} then Skip_Reversal Shot_U2{4}=!Shot_Up{0} : Shot_D2{5}=!Shot_Down{1} Shot_L2{6}=!Shot_Left{2} : Shot_R2{7}=!Shot_Right{3} Skip_Reversal rem ***************************************************** rem * Slide player0 if not hitting the border. rem * if Shot_U2{4} && P0_Up_Down > 10 then P0_Up_Down=P0_Up_Down - 1.02 if Shot_D2{5} && P0_Up_Down < 87 then P0_Up_Down=P0_Up_Down + 1.02 if Shot_L2{6} then P0_Left_Right=P0_Left_Right - 1.02 if Shot_R2{7} then P0_Left_Right=P0_Left_Right + 1.02 rem ***************************************************** rem * If the slowest speed is reached, stop sliding. rem * if Slide_Speed = 128 then Slide_Speed=0 : P0_Hit_Pixel{1}=0 goto Done_Slide Done_J0 rem ***************************************************** rem * Sets up the fake gravity slide. rem * Slide_Counter=0 : Slide_Speed=1 : P0_Hit_Pixel{1}=0 Done_Slide rem ***************************************************** rem * Skip fire button and reset switch if Debounce is not zero. rem * if Debounce<>0 then Done_Fire rem ***************************************************** rem * Any Atari 2600 program should restart when the reset switch rem * is pressed. It is part of the usual standards and procedures. rem * if switchreset then Start_Restart rem ***************************************************** rem * rem * Fire missile when fire button is pressed. rem * rem ***************************************************** rem * rem * If the fire button is not pressed, skip this section. rem * if !joy0fire then Done_Fire rem ***************************************************** rem * If the missile is moving, skip this section. rem * if Shot_Moving{0} then Done_Fire Shot_Moving{0}=1 rem ***************************************************** rem * Tells the missile where to start. rem * missile0x=P0_Left_Right + Shot_X : missile0y=P0_Up_Down + Shot_Y rem ***************************************************** rem * Make a snapshot of the ship direction so the missile will rem * stay on track until it hits something. rem * Shot_U_Snapshot{4}=Shot_Up{0} : Shot_D_Snapshot{5}=Shot_Down{1} Shot_L_Snapshot{6}=Shot_Left{2} : Shot_R_Snapshot{7}=Shot_Right{3} rem ***************************************************** rem * Set up sound effect. rem * Sound_Shoot=0 : Sound_Shoot{3}=1 : AUDV0=0 : Sound_Counter=28 Done_Fire rem ***************************************************** rem * rem * Move the missile. rem * rem ***************************************************** rem * rem * If the missile is not moving, skip this section. rem * if !Shot_Moving{0} then Done_Shot rem ***************************************************** rem * If the missile hits the border, reset for the next shot. rem * if missile0y < 3 || missile0y > 86 then Border_Hit if missile0x < 3 || missile0x > 159 then Border_Hit rem ***************************************************** rem * Move the missile using the snapshot info to stay on track. rem * if Shot_U_Snapshot{4} then missile0y=missile0y-2 if Shot_D_Snapshot{5} then missile0y=missile0y+2 if Shot_L_Snapshot{6} then missile0x=missile0x-2 if Shot_R_Snapshot{7} then missile0x=missile0x+2 goto Done_Shot Border_Hit rem ***************************************************** rem * Border has been hit. Reset for the next shot. rem * Shot_Moving{0}=0 : missile0y=90 Shot_U_Snapshot{4}=0 : Shot_D_Snapshot{5}=0 : Shot_L_Snapshot{6}=0 : Shot_R_Snapshot{7}=0 Done_Shot rem ***************************************************** rem * rem * Place a random playfield pixel. rem * rem ***************************************************** rem * rem * Slows this section down a bit. rem * if Master_Counter < 6 then Skip_Pixel rem ***************************************************** rem * Rate tells the program how often pixels will appear. rem * The range is 0 to 14. Increase the number to increase the rem * difficulty. rem * temp5 = (rand&15) : if temp5 > Rate then Skip_Pixel rem ***************************************************** rem * Get random numbers. I added (rand/64) because rem * (rand&3) gave a not-so-random result. rem * temp5 = (rand&31) : temp6 = (rand&7)+(rand/64) rem ***************************************************** rem * Convert player position to playfield position. rem * temp3=(P0_Left_Right-30)/4 : temp4=temp3+8 rem ***************************************************** rem * If pixel will not land on player, allow it. rem * if temp5 >= temp3 && temp5 <= temp4 then Skip_Pixel pfpixel temp5 temp6 on Skip_Pixel rem ***************************************************** rem * rem * Missile/playfield collision check. rem * rem ***************************************************** rem * rem * If no collision, skip this section. rem * if !collision(playfield,missile0) then Skip_Missile_Pixel_Wipe rem ***************************************************** rem * If missile is in the playfield area, delete the pf pixel. rem * temp5=(missile0x-17)/4 : temp6=(missile0y)/8 if temp5 < 0 || temp5 > 31 then Skip_Missile_Pixel_Wipe if temp6 < 0 || temp6 > 10 then Skip_Missile_Pixel_Wipe rem ***************************************************** rem * Makes sure a pixel is really there. rem * if !pfread(temp5,temp6) then Skip_Missile_Pixel_Wipe rem ***************************************************** rem * Set up sound effect. rem * Sound_Shot_Pixel=0 : Sound_Shot_Pixel{0}=1 : AUDV0=0 : Sound_Counter=29 rem ***************************************************** rem * Delete the pf pixel. rem * pfpixel temp5 temp6 off rem ***************************************************** rem * Add to score. rem * score = score +10 Skip_Missile_Pixel_Wipe rem ***************************************************** rem * rem * Player/playfield collision check. rem * rem ***************************************************** rem * rem * Collision already happened, skip this section to avoid rem * draining energy too much. rem * if P0_Hit_Pixel{1} then Skip_Player0_Pixel_Hit rem ***************************************************** rem * If no collision, skip this section. rem * if !collision(playfield,player0) then Skip_Player0_Pixel_Hit rem ***************************************************** rem * Health bar is decreased. Change color if needed or end game. rem * pfscore2=pfscore2/2 : P0_Hit_Pixel{1}=1 if pfscore2<16 then pfscorecolor=26 if pfscore2<3 then pfscorecolor=70 if pfscore2<1 then Game_Over{2}=1 rem ***************************************************** rem * Bounce back after hitting a pf pixel. rem * if !Shot_Up{0} && P0_Up_Down > 10 then P0_Up_Down=P0_Up_Down - 2.02 if !Shot_Down{1} && P0_Up_Down < 87 then P0_Up_Down=P0_Up_Down + 2.02 if !Shot_Left{2} then P0_Left_Right=P0_Left_Right - 2.02 if !Shot_Right{3} then P0_Left_Right=P0_Left_Right + 2.02 rem ***************************************************** rem * Set up sound effect. rem * Sound_Ship_Bounce=0 : Sound_Ship_Bounce{1}=1 : AUDV0=0 : Sound_Counter=16 Skip_Player0_Pixel_Hit rem ***************************************************** rem * Missile shoot sound. rem * if !Sound_Shoot{3} then Skip_Shoot_Sound AUDV0=6 : AUDC0=14 : Sound_Counter=Sound_Counter+1 if Sound_Counter > 31 then Sound_Counter =0 if Sound_Counter = 5 then AUDV0=0 : Sound_Shoot{3}=0 AUDF0=Sound_Counter Skip_Shoot_Sound rem ***************************************************** rem * Missile hitting pixel sound. rem * if !Sound_Shot_Pixel{0} then Skip_Shot_Hit_Sound AUDV0=8 : AUDC0=6 : Sound_Counter=Sound_Counter+1 if Sound_Counter > 31 then Sound_Counter =0 if Sound_Counter = 10 then AUDV0=0 : Sound_Shot_Pixel{0}=0 AUDF0=Sound_Counter Skip_Shot_Hit_Sound rem ***************************************************** rem * Ship bouncing off a pixel sound. rem * if !Sound_Ship_Bounce{1} then Skip_Ship_Hit_Sound AUDV0=8 : AUDC0=12 : Sound_Counter=Sound_Counter+1 if Sound_Counter = 27 then AUDV0=0 : Sound_Ship_Bounce{1}=0 AUDF0=Sound_Counter Skip_Ship_Hit_Sound rem ***************************************************** rem * Decrease Debounce. When Debounce reaches zero, the rem * fire button becomes active. rem * if Debounce>0 then Debounce = Debounce - 1 rem ***************************************************** rem * The screen would be blank without drawscreen. rem * drawscreen if Game_Over{2} then goto Game_is_Over goto Main_Loop rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** rem * rem * Joystick gotos start here. rem * rem ****************************************************** rem ****************************************************** rem ****************************************************** rem ****************************************************** GoUp rem ***************************************************** rem * rem * Joystick direction: Up. rem * rem ***************************************************** rem * rem * Move player 0 if not hitting the border. rem * if P0_Up_Down > 10 then P0_Up_Down=P0_Up_Down-1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=1 : Shot_Down{1}=0 : Shot_Left{2}=0 : Shot_Right{3}=0 rem ***************************************************** rem * Sprite is not reflected and missile starting location is set. rem * Flip_P0=0 : Shot_X=4 : Shot_Y=250 rem ***************************************************** rem * Jumps to the next animation frame. rem * on Frame_Counter goto P0_Up_00 P0_Up_01 P0_Up_02 P0_Up_03 GoDown rem ***************************************************** rem * rem * Joystick direction: Down. rem * rem ***************************************************** rem * rem * Move player 0 if not hitting the border. rem * if P0_Up_Down < 87 then P0_Up_Down=P0_Up_Down+1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=0 : Shot_Down{1}=1 : Shot_Left{2}=0 : Shot_Right{3}=0 rem ***************************************************** rem * Sprite is not reflected and missile starting location is set. rem * Flip_P0=0 : Shot_X=4 : Shot_Y=255 rem ***************************************************** rem * Jumps to the next animation frame. rem * on Frame_Counter goto P0_Down_00 P0_Down_01 P0_Down_02 P0_Down_03 GoLeft rem ***************************************************** rem * rem * Joystick direction: Left. rem * rem ***************************************************** rem * rem * Move player0. rem * P0_Left_Right=P0_Left_Right-1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=0 : Shot_Down{1}=0 : Shot_Left{2}=1 : Shot_Right{3}=0 rem ***************************************************** rem * Sprite is not reflected and missile starting location is set. rem * Flip_P0=0 : Shot_X=1 : Shot_Y=252 rem ***************************************************** rem * Jumps to the next animation frame. rem * on Frame_Counter goto P0_Left_00 P0_Left_01 P0_Left_02 P0_Left_03 GoRight rem ***************************************************** rem * rem * Joystick direction: Right. rem * rem ***************************************************** rem * rem * Move player0. rem * P0_Left_Right=P0_Left_Right+1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=0 : Shot_Down{1}=0 : Shot_Left{2}=0 : Shot_Right{3}=1 rem ***************************************************** rem * Sprite is reflected and missile starting location is set. rem * Flip_P0=8 : Shot_X=7 : Shot_Y=252 rem ***************************************************** rem * Jumps to the next animation frame (shared with GoLeft). rem * on Frame_Counter goto P0_Left_00 P0_Left_01 P0_Left_02 P0_Left_03 GoUpLeft rem ***************************************************** rem * rem * Joystick direction: Up-Left. rem * rem ***************************************************** rem * rem * Move player0 if not hitting the border. rem * if P0_Up_Down > 10 then P0_Up_Down=P0_Up_Down-1.42 if P0_Left_Right > 2 then P0_Left_Right=P0_Left_Right-1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=1 : Shot_Down{1}=0 : Shot_Left{2}=1 : Shot_Right{3}=0 rem ***************************************************** rem * Sprite is not reflected and missile starting location is set. rem * Flip_P0=0 : Shot_X=1 : Shot_Y=250 rem ***************************************************** rem * Jumps to the next animation frame. rem * on Frame_Counter goto P0_UpLeft_00 P0_UpLeft_01 P0_UpLeft_02 P0_UpLeft_03 GoUpRight rem ***************************************************** rem * rem * Joystick direction: Up-Right. rem * rem ***************************************************** rem * rem * Move player0 if not hitting the border. rem * if P0_Up_Down > 10 then P0_Up_Down=P0_Up_Down-1.42 if P0_Left_Right < 152 then P0_Left_Right=P0_Left_Right+1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=1 : Shot_Down{1}=0 : Shot_Left{2}=0 : Shot_Right{3}=1 rem ***************************************************** rem * Sprite is reflected and missile starting location is set. rem * Flip_P0=8 : Shot_X=7 : Shot_Y=250 rem ***************************************************** rem * Jumps to the next animation frame (shared with GoUpLeft). rem * on Frame_Counter goto P0_UpLeft_00 P0_UpLeft_01 P0_UpLeft_02 P0_UpLeft_03 GoDownLeft rem ***************************************************** rem * rem * Joystick direction: Down-Left. rem * rem ***************************************************** rem * rem * Move player0 if not hitting the border. rem * if P0_Up_Down < 87 then P0_Up_Down=P0_Up_Down+1.42 if P0_Left_Right > 2 then P0_Left_Right=P0_Left_Right-1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=0 : Shot_Down{1}=1 : Shot_Left{2}=1 : Shot_Right{3}=0 rem ***************************************************** rem * Sprite is not reflected and missile starting location is set. rem * Flip_P0=0 : Shot_X=1 : Shot_Y=255 rem ***************************************************** rem * Jumps to the next animation frame. rem * on Frame_Counter goto P0_DownLeft_00 P0_DownLeft_01 P0_DownLeft_02 P0_DownLeft_03 GoDownRight rem ***************************************************** rem * rem * Joystick direction: Down-Right. rem * rem ***************************************************** rem * rem * Move player0 if not hitting the border. rem * if P0_Up_Down < 87 then P0_Up_Down=P0_Up_Down+1.42 if P0_Left_Right < 152 then P0_Left_Right=P0_Left_Right+1.42 rem ***************************************************** rem * Tells the program which direction the ship is pointing. rem * Shot_Up{0}=0 : Shot_Down{1}=1 : Shot_Left{2}=0 : Shot_Right{3}=1 rem ***************************************************** rem * Sprite is reflected and missile starting location is set. rem * Flip_P0=8 : Shot_X=7 : Shot_Y=255 rem ***************************************************** rem * Jumps to the next animation frame (shared with GoDownLeft). rem * on Frame_Counter goto P0_DownLeft_00 P0_DownLeft_01 P0_DownLeft_02 P0_DownLeft_03 rem ***************************************************** rem * rem * Animation frames. rem * rem ***************************************************** P0_Up_00 player0: %01011010 %01100110 %00111100 %01111110 %11111111 %00011000 %00011000 %00011000 end goto Done_J0 P0_Up_01 player0: %01100110 %01000010 %10111101 %01111110 %11111111 %00011000 %00011000 %00011000 end goto Done_J0 P0_Up_02 player0: %01000010 %11000011 %10111101 %01111110 %11111111 %00011000 %00011000 %00011000 end goto Done_J0 P0_Up_03 player0: %11100111 %11000011 %10111101 %01111110 %11111111 %00011000 %00011000 %00011000 end goto Done_J0 P0_Down_00 player0: %00011000 %00011000 %00011000 %11111111 %01111110 %00111100 %01100110 %01011010 end goto Done_J0 P0_Down_01 player0: %00011000 %00011000 %00011000 %11111111 %01111110 %10111101 %01000010 %01100110 end goto Done_J0 P0_Down_02 player0: %00011000 %00011000 %00011000 %11111111 %01111110 %10111101 %11000011 %01000010 end goto Done_J0 P0_Down_03 player0: %00011000 %00011000 %00011000 %11111111 %01111110 %10111101 %11000011 %11100111 end goto Done_J0 P0_Left_00 player0: %00010000 %00011011 %00011110 %11111101 %11111101 %00011110 %00011011 %00010000 end goto Done_J0 P0_Left_01 player0: %00010100 %00011011 %00011101 %11111100 %11111100 %00011101 %00011011 %00010100 end goto Done_J0 P0_Left_02 player0: %00010110 %00011011 %00011100 %11111100 %11111100 %00011100 %00011011 %00010110 end goto Done_J0 P0_Left_03 player0: %00010111 %00011011 %00011101 %11111100 %11111100 %00011101 %00011011 %00010111 end goto Done_J0 P0_UpLeft_00 player0: %00001000 %10010010 %11111000 %01111101 %00111110 %01111100 %11101100 %11000110 end goto Done_J0 P0_UpLeft_01 player0: %00001100 %11010000 %11111001 %01111101 %00111110 %01111110 %11101100 %11000110 end goto Done_J0 P0_UpLeft_02 player0: %00101000 %11010000 %11111000 %01111101 %00111110 %01111111 %11101100 %11000110 end goto Done_J0 P0_UpLeft_03 player0: %00111100 %11110000 %11111001 %01111101 %00111111 %01111111 %11101100 %11000110 end goto Done_J0 P0_DownLeft_00 player0: %11000110 %11101100 %01111100 %00111110 %01111101 %11111000 %10010010 %00001000 end goto Done_J0 P0_DownLeft_01 player0: %11000110 %11101100 %01111110 %00111110 %01111101 %11111001 %11010000 %00001100 end goto Done_J0 P0_DownLeft_02 player0: %11000110 %11101100 %01111111 %00111110 %01111101 %11111000 %11010000 %00101000 end goto Done_J0 P0_DownLeft_03 player0: %11000110 %11101100 %01111111 %00111111 %01111101 %11111001 %11110000 %00111100 end goto Done_J0 Game_is_Over rem ***************************************************** rem * rem * Game over. rem * rem ***************************************************** rem * rem * Set up 2 second loop and set up game over sound. rem * Master_Counter=120 : Sound_Shot_Pixel{0}=1 : AUDV0=0 : Sound_Counter=0 Loop_2_Seconds scorecolor = 28 : COLUP0=72 : COLUPF = $CE : PF0 = %11110000 : REFP0=Flip_P0 rem ***************************************************** rem * End of game sound. rem * if !Sound_Shot_Pixel{0} then Skip_Game_Over_Sound AUDV0=8 : AUDC0=8 : Sound_Counter=Sound_Counter+1 if Sound_Counter = 31 then AUDV0=0 : Sound_Shot_Pixel{0}=0 AUDF0=Sound_Counter Skip_Game_Over_Sound Master_Counter=Master_Counter-1 drawscreen if Master_Counter > 0 then Loop_2_Seconds Master_Counter=60 Baby_Loop scorecolor = 28 : COLUP0=10 : COLUPF = $CE : PF0 = %11110000 : REFP0=Flip_P0 drawscreen Master_Counter=Master_Counter-1 if Master_Counter > 0 then Baby_Loop pfclear Loop_Ready_to_Restart scorecolor = 28 : COLUP0=10 : COLUPF = $CE : REFP0=Flip_P0 : player0y=100 drawscreen if switchreset || joy0fire then Start_Restart goto Loop_Ready_to_Restart