10 randomize (36552) 20 gosub 1800 : rem --------------------------Graphics set up 35 sound 0,500 : sound 0,995 : sound 0,995 100 rem _____________ 101 rem ________________________M * A * I * N 102 rem ------------- 105 graphics window -1,-1,xp,yp,2 : xp = xp+z : rem ------- scroll 106 graphics sprite 3 ex(n),ey(n),id(n,st) : graphics sprite 1 ex(0),ey(0),id(0,pst) 110 if xp < 1 then z = 0.8 115 if xp > 280 then z = -0.8 : rem ------- SCcn 120 m = mouse(0) : x = mouse(1) : y = mouse(2) : graphics sprite 2 x,y,900 130 ey(0) = ey(0)+yz : ex(0) = ex(0)+xz 180 rem ________________ INPUT CHECK 200 a$ = inkey$ 210 if a$ = "q" then end 220 if a$ = "." then end 230 if a$ = "8" then gosub 3000 240 if a$ = "2" then gosub 3300 250 if a$ = "4" then gosub 3500 260 if a$ = "6" then gosub 3700 270 if a$ = "5" then fv = 1 280 if m <> 0 then sto = sto+1 290 if sto > 20 then end 300 graphics sprite 3 ex(n),ey(n),id(n,st) : graphics sprite 1 ex(0),ey(0),id(0,pst) 999 rem _________________ 1000 rem ___________ LOGIC CHECKS 1010 rem _________________ 1020 if ex(0) > 450 then ex(0) = 6 1030 if ex(0) < 5 then ex(0) = 445 1040 if ey(0) > 200 then ey(0) = 6 1050 if ey(0) < 5 then ey(0) = 190 1060 rem if fv <> 0 then gosub 4000 : rem is fire state positive 1080 xp = xp+z 1090 if xp < 1 then z = 0.5 1100 if xp > 280 then z = -0.5 1110 if ex(n) < ex(0) then ex(n) = ex(n)+sp : st = 1 1120 if ex(n) > ex(0) then ex(n) = ex(n)-sp : st = 0 1130 if ey(n) < ey(0) then ey(n) = ey(n)+sp 1140 if ey(n) > ey(0) then ey(n) = ey(n)-sp 1197 rem 1198 rem 1199 rem ____________________ SPRITE COLLISIONS CHECK 1300 if sprite 1 collision < 1 then 100 1301 if sprite 1 collision = 9 then 100 1310 graphics sprite 9 ex(n),ey(n),666 : rem ---------place death sprite 1330 sound 0,995 : sound 0,991 : sound 0,900 1400 n = n+1 : if n > 8 then n = 1 1500 st = 1 : ex(n) = 0 : ey(n) = 0 : z = 0.5 1550 ey(0) = ey(0)+yz : ex(0) = ex(0)+xz : rem move player 1600 goto 100 1700 end 1782 rem ----------------------------------------------------------- 1790 rem 1791 rem 1800 rem _____________________ GRAPHICS SETUP 1900 dim ex(15),ey(15),id(20,2) : rem--ID=icons,state(left or right) 1910 m = mouse(0) : x = mouse(1) : y = mouse(2) : ex(0) = 250 : ey(0) = 50 2000 c = 1 : id(0,0) = 100 : id(0,1) = 101 : cx = 1 2010 cy = 1 : z = 0.5 : xp = 1 : n = 2 : st = 1 : pst = 1 : sp = 5 2100 open "realb.rsrc" for data input 2200 graphics window 300,20,450,250 : graphics 0 : graphics pict -20,-20,128 2300 graphics sprite 1 ex(0),ey(0),id(0,pst) : graphics sprite 2 x,y,900 2400 rem ------ ex(zero),ey(zero)=PLAYER ---- 2500 for n = 1 to 8 step 2 : id(n,0) = 127+n : id(n,1) = 128+n : next n : rem ----------ID the ENEMY SPRITES 2550 for n = 1 to 8 : id(8+n,0) = n : id(8+n,1) = 9-n : next n : rem -------------- ID THE WHIRLIBIRD 2600 n = 1 : st = 1 2800 return 2900 end 3000 rem _________ MOVE PLAYER Y 3100 xz = 0 : yz = -sp : ey(0) = ey(0)+yz 3200 return 3300 xz = 0 : yz = sp : ey(0) = ey(0)+yz 3400 return 3490 rem ----------- MOVE PLAYER X -------- 3500 yz = 0 : xz = -sp : ex(0) = ex(0)+xz : pst = 0 3600 return 3700 yz = 0 : xz = sp : ex(0) = ex(0)+xz : pst = 1 3800 return 9900 list