set display mode 1024,768,32:set camera range 0,99999:color backdrop 0:hide mouse
make object cone 1,100
make object cone 2,100
autocam off
ink rgb(255,255,255),0:dot 1,1:get image 1,0,0,2,2
begin1:
position object 1,0,-2100,2500:show object 1:ink rgb(255,255,255),0
position object 2,0,-2100,2500:color object 2,rgb(255,0,255):ghost object on 2
for x=10 to 50
   if object exist(x) then delete object x
next x
cls:set text size 18:set text font "tahoma"
speed#=1:score#=0:level#=1:move#=2:timeshot#=0:bombshot#=0:timeshot2#=0:bombshot2#=0:players#=0
hyper#=0:team#=0:FDB#=1:UWB#=1:TDU#=1:FDBTime#=0:TDUTime#=0:TDUUse#=0:player1#=0
Gosub Game:
Begin:
do
   Gosub MovePlayer
loop
if players#>0 and players#<3
   MovePlayer:
   if leftkey()=1 and object position x(1)>-2300 then move object left 1,move#
   if rightkey()=1 and object position x(1)<2300 then move object right 1,move#
endif
if players#>1 and players#<4
   MovePlayer2:
   if keystate(30)=1 and object position x(2)>-2300 then move object left 2,move#
   if keystate(31)=1 and object position x(2)<2300 then move object right 2,move#
endif
Obstacles:
for x=10 to 20
   if rnd(1000-level#*10)=1
   if object exist(x)=0
      make object cube x,300:color object x,rgb(0,0,255):ghost object on x
      scale object x,rnd(500)+100,10,10
      position object x,(rnd(4600)-2300),1000,2500
   endif
   endif
   if object exist(x)=1
      for y=1 to 2
         if object exist(y)
            if object collision(y,x)=1 and object visible(y)=1
               if team#=1
                  repeat
                     set text size 72:center text screen width()/2,screen height()/2-70,"GAME OVER"
                     set text size 32:center text screen width()/2,screen height()/2,"Final Score: "+str$(score#)
                     set text size 32:center text screen width()/2,screen height()/2+30,"Press Space to Continue"
                  until spacekey()=1
                  goto begin1
               endif
               if team#=0
                  repeat
                     set text size 72:center text screen width()/2,screen height()/2-70,"Player "+str$(y)+" Lost"
                     set text size 32:center text screen width()/2,screen height()/2,"Final Score: "+str$(score#)
                     set text size 32:center text screen width()/2,screen height()/2+30,"Press Space to Continue"
                  until spacekey()=1
                  if object visible(2)=1
                     if y=2 then players#=1
                  endif
                  if object visible(1)=1
                     if y=1 then players#=3
                  endif
                  hide object y
                  if object visible(1)=0 and object visible(2)=0 then goto begin1
               endif
            endif
         endif
      next y
      if object exist(100) and object exist(x)
         if object collision(100,x) then delete object x:delete object 100
      endif
      if object exist(101) and object exist(x)
         if object collision(101,x) then delete object x
      endif
      if object exist(102) and object exist(x)
         if object collision(102,x) then delete object x:delete object 102
      endif
      if object exist(103) and object exist(x)
         if object collision(103,x) then delete object x
      endif
      if object exist(40) and object exist(x)
         if object collision(40,x) then yrotate object x,90
      endif
      if object exist(41) and object exist(x)
         if object collision(41,x) then delete object x
      endif
      if object exist(x)
         move object down x,speed#
         if hyper#=1 then yrotate object x,rotate
         inc rotate:if rotate=40+level#*20 then rotate=0
         if object position y(x)<-2200 then delete object x:inc score#,level#+10
      endif
   endif
next x
Difficult:
if score#>level#*500 and speed#=1 then speed#=2:move#=2.5:inc level#
if score#>level#*500 and speed#=2 then speed#=3:move#=3.0:inc level#
if score#>level#*500 and speed#=3 then speed#=4:move#=3.5:inc level#
if score#>level#*500 and speed#=4 then speed#=5:move#=4.0:inc level#
if score#>level#*500 and speed#=5 then speed#=6:move#=4.5:inc level#
if score#>level#*500 and speed#=6 then speed#=7:move#=5.0:inc level#
if score#>level#*500 and speed#=7 then speed#=8:move#=5.5:inc level#
if players#>0 and players#<3
   Shoot:
   if returnkey()=1 and timeshot#<timer()-1000
      timeshot#=timer():timeshoot#=timeshot#+1000
      if object exist(100)=0
         make object sphere 100,40,50,50
         color object 100,rgb(0,255,0)
         position object 100,object position x(1),object position y(1),2500
      endif
   endif
   if object exist(100)=1
      move object up 100,5
      if object position y(100)>1000 then delete object 100
   endif
endif
if players#>0 and players#<3
   Bomb:
   if shiftkey()=1 and bombshot#<timer()-10000
      bombshot#=timer():bombshoot#=bombshot#+10000
      if object exist(101)=0
         make object sphere 101,400,50,50
         color object 101,rgb(0,255,0)
         position object 101,object position x(1),object position y(1),2500
      endif
   endif
   if object exist(101)=1
      move object up 101,5
      if object position y(101)>1000 then delete object 101
   endif
endif
if players#>1 and players#<4
Shoot2:
   if keystate(33)=1 and timeshot2#<timer()-1000
      timeshot2#=timer():timeshoot1#=timeshot2#+1000
      if object exist(102)=0
         make object sphere 102,40,50,50
         color object 102,rgb(0,255,0)
         position object 102,object position x(2),object position y(2),2500
      endif
   endif
   if object exist(102)=1
      move object up 102,5
      if object position y(102)>1000 then delete object 102
   endif
endif
if players#>1 and players#<4
   Bomb2:
   if keystate(34)=1 and bombshot2#<timer()-10000
      bombshot2#=timer():bombshoot1#=bombshot2#+10000
      if object exist(103)=0
         make object sphere 103,400,50,50
         color object 103,rgb(0,255,0)
         position object 103,object position x(2),object position y(2),2500
      endif
   endif
   if object exist(103)=1
      move object up 103,5
      if object position y(103)>1000 then delete object 103
   endif
endif
Stats:
set text size 18
ink rgb(255,0,0),0:text 10,10,"Score:"+str$(score#):text 10,30,"Level:"+str$(level#)
if players#=2 then ink rgb(255,0,0),0:text 10,90,"----------------------------"
if players#>0 and players#<3
timeshoot2#=timeshoot#-timer():if timeshoot2#<0 then timeshoot2#=0
bombshoot2#=bombshoot#-timer():if bombshoot2#<0 then bombshoot2#=0
ink rgb(255,0,0),0:text 10,50,"Player 1 Can shoot in:"+str$(timeshoot2#)+"milliseconds"
ink rgb(255,0,0),0:text 10,70,"Player 1 Can bomb in:"+str$(bombshoot2#)+"milliseconds"
if player1#=1
ink rgb(255,0,0),0:text 10,90,"You Have:"+str$(FDB#)+"Force Direction Blockade(s)"
ink rgb(255,0,0),0:text 10,110,"You Have:"+str$(UWB#)+"Uranium Wave Bomb(s)"
ink rgb(255,0,0),0:text 10,130,"You Have:"+str$(TDU#)+"Time Distortion Unit(s)"
endif
endif
timeshoot0#=timeshoot1#-timer():if timeshoot0#<0 then timeshoot0#=0
bombshoot0#=bombshoot1#-timer():if bombshoot0#<0 then bombshoot0#=0
if players#=2
ink rgb(255,0,0),0:text 10,110,"Player 2 Can shoot in:"+str$(timeshoot0#)+"milliseconds"
ink rgb(255,0,0),0:text 10,130,"Player 2 Can bomb in:"+str$(bombshoot0#)+"milliseconds"
endif
if players#=3
ink rgb(255,0,0),0:text 10,50,"Player 2 Can shoot in:"+str$(timeshoot0#)+"milliseconds"
ink rgb(255,0,0),0:text 10,70,"Player 2 Can bomb in:"+str$(bombshoot0#)+"milliseconds"
endif
PowerUps:
if player1#=1
if rnd(20000)=1
   rndnum=rnd(5)
   if rndnum>-1 and rndnum<2
      if object exist(30)=0
         make object sphere 30,300:scale object 30,100,40,10:color object 30,rgb(251,244,0)
         position object 30,rnd(4600)-2300,1000,2500
      endif
   endif
   if rndnum=3
      if object exist(31)=0
         make object cube 31,300:scale object 31,100,40,10:color object 31,rgb(251,244,0)
         position object 31,rnd(4600)-2300,1000,2500
      endif
   endif
   if rndnum>3 and rndnum<6
      if object exist(32)=0
         make object cylinder 32,300:scale object 32,100,40,10:color object 32,rgb(251,244,0)
         position object 32,rnd(4600)-2300,1000,2500
      endif
   endif
endif
if object exist(30)=1
   move object down 30,2
   if object position y(30)<-2200 then delete object 30
   if object exist(30) and object exist(1)
      if object collision(30,1)
         inc FDB#:delete object 30
      endif
   endif
endif
if object exist(31)=1
   move object down 31,2
   if object position y(31)<-2200 then delete object 31
   if object exist(31) and object exist(1)
      if object collision(31,1)
         inc UWB#:delete object 31
      endif
   endif
endif
if object exist(32)=1
   move object down 32,2
   if object position y(32)<-2200 then delete object 32
   if object exist(32) and object exist(1)
      if object collision(32,1)
         inc TDU#:delete object 32
      endif
   endif
endif
if FDB#>0
   if upkey()=1 and object exist(40)=0
      FDBTime#=timer():dec FDB#
      make object box 40,4600,30,10:position object 40,0,800,2500:color object 40,rgb(255,0,0)
   endif
endif
if object exist(40)
   if FDBTime#<timer()-10000 then delete object 40
endif
if UWB#>0
   if downkey()=1 and object exist(40)=0
      dec UWB#
      make object sphere 41,100,30,10:position object 41,0,0,2500:color object 41,rgb(255,0,255):ghost object on 41
   endif
endif
if object exist(41)
   scale object 41,sizex,sizey,10:inc sizex:inc sizey
   if object size x(41)>4600 then delete object 41
endif
if TDU#>0
   if controlkey()=1 and TDUUse#=0
      TDUTime#=timer():dec TDU#:inc TDUUse#
      speed#=speed#/2
   endif
endif
if TDUUse#=1
   if TDUTime#<timer()-10000 then speed#=speed#*2:TDUUse#=0
endif
endif
Stars:
for s=1 to 100
   if sprite exist(s)=0
      sprite s,rnd(1024),rnd(768),1
   endif
   if sprite exist(s)=1
      move sprite s,-.1
      if sprite y(s)>768 then sprite s,rnd(1024),0,1
   endif
next s
return
Game:
do
   set text size 18:center text screen width()/2,40,"Controls"
   set text size 18:center text screen width()/2,60,"^^^^^"
   set text size 18:center text screen width()/2,80,"Player 1"
   set text size 18:center text screen width()/2,100,"______________________________"
   set text size 18:center text screen width()/2,120,"- Move with left and right arrow keys"
   set text size 18:center text screen width()/2,140,"- Shoot with enter and bomb with shift"
   set text size 18:center text screen width()/2,160,"Player 2"
   set text size 18:center text screen width()/2,180,"___________________________________"
   set text size 18:center text screen width()/2,200,"- Move left with -a- and move right with -s-"
   set text size 18:center text screen width()/2,220,"- Shoot with -f- and bomb with -g-"
   set text size 18:center text screen width()/2,240,"----------------------------------------------------------------------------------------------------------------------------------------------------"
   set text size 18:center text screen width()/2,260,"Modes"
   set text size 18:center text screen width()/2,280,"^^^^"
   set text size 18:center text screen width()/2,300,"You can play one or two players"
   set text size 18:center text screen width()/2,320,"2 Player Modes"
   set text size 18:center text screen width()/2,340,"_________________________________________________"
   set text size 18:center text screen width()/2,360,"- Play against each other, if one player dies the other continues"
   set text size 18:center text screen width()/2,380,"- Play on a team, if one play dies you both go down"
   set text size 18:center text screen width()/2,400,"1 Player Modes"
   set text size 18:center text screen width()/2,420,"_______________________"
   set text size 18:center text screen width()/2,440,"- Traditional Mode, just play"
   set text size 18:center text screen width()/2,460,"- Hyper Mode, pieces go crazy making it harder to dodge and hit"
   set text size 18:center text screen width()/2,480,"----------------------------------------------------------------------------------------------------------------------------------------------------"
   set text size 18:center text screen width()/2,500,"Rules"
   set text size 18:center text screen width()/2,520,"^^^^"
   set text size 18:center text screen width()/2,540,"You are the player at the bottom, you can move from side to side and"
   set text size 18:center text screen width()/2,560,"dodge the pieces.  You can shoot and bomb the pieces but you only get"
   set text size 18:center text screen width()/2,580,"points for piecies that make it to the bottom.  Level increases every"
   set text size 18:center text screen width()/2,600,"500 points. Good Luck."
   set text size 26:center text screen width()/2,660,"PRESS ENTER TO CONTINUE"
   if returnkey()=1 then exit
loop
sleep 400
do
   set text size 18:center text screen width()/2,260,"PowerUps"
   set text size 18:center text screen width()/2,280,"^^^^^^"
   set text size 18:center text screen width()/2,300,"Only available in 1 player mode"
   set text size 18:center text screen width()/2,340,"Force Direction Blockade(FDB)-A blockade that will change the direction of the pieces"
   set text size 18:center text screen width()/2,360,"Uranium Wave Bomb(UWB)-A huge bomb that will destroy everything in it's path"
   set text size 18:center text screen width()/2,380,"Time Distortion Unit(TDU)-A time unit to slow down the pieces"
   set text size 18:center text screen width()/2,420,"FDB-Are small ellipses(Launch with upkey)"
   set text size 18:center text screen width()/2,440,"UWB-Are small rectangles(Launch with downkey)"
   set text size 18:center text screen width()/2,460,"TDU-Are small cylinders(Launch with right control)"
   set text size 26:center text screen width()/2,520,"PRESS ENTER TO PLAY"
   if returnkey()=1 then exit
loop
do
   set text size 18:center text screen width()/2,300,"Press -1- for One Player"
   set text size 18:center text screen width()/2,330,"Press -2- for Two Player"
   if keystate(2)=1 then players#=1:player1#=1:hide object 2:exit
   if keystate(3)=1 then exit:show object 1:show object 2
loop
if players#=1
sleep 400
   do
      set text size 18:center text screen width()/2,300,"Press -1- for Traditional Mode"
      set text size 18:center text screen width()/2,330,"Press -2- for Hyper Mode"
      if keystate(2)=1 then goto Begin
      if keystate(3)=1 then hyper#=1:goto Begin
   loop
endif
sleep 400
do
   set text size 18:center text screen width()/2,300,"Press -1- to play against Each Other"
   set text size 18:center text screen width()/2,330,"Press -2- to play on a Team"
   if keystate(2)=1 then players#=2:goto Begin
   if keystate(3)=1 then players#=2:team#=1:goto Begin
loop