The sequal to the much loved Space Drive is here.
Woohoo!
DBP only this time I'm afraid.
The controls:
Arrow keys to move left and right, and to accelerate and do the opposite of that.
Mouse to control your new laser as LMB is to shoot.
The HUD:
First displayed is your score, second is your time left and third is your bullets. I mean plasma, for your laser... Oh, and the bar in the middle is your sheild
The holy code:
randomize timer():hide mouse:sync on : sync rate 60: set window on : set window title "Space Drive II" : set display mode 640,480,16 : backdrop on : color backdrop rgb(0,0,0): set text size 20:MAKE PARTICLES 1, 0,15,15:color particles 1,200,100,0:SET PARTICLE LIFE 1,20:SET PARTICLE FLOOR 1,0:SET PARTICLE CHAOS 1, 10:SET PARTICLE gravity 1,0
make object cone 1,20: color object 1,RGB(100,50,200): create bitmap 1,512,512: for x = 1 to 1000: dot rnd(512),rnd(512): next x:get image 2,0,0,512,512: delete bitmap 1: make object plain 2,200, 130: position object 2,0,56,0: texture object 2,2:
make object sphere 3,10: xrotate object 3,90: position object 3,-70,100,0: scale object 3,100,100,200: color object 3,RGB(225,225,0): position camera 0,80,-100:sync:center text 320,240, "In space...":sync:wait 2000:center text 320,240, "Nobody drives this fast...":sync:wait 3000:center text 320,240, "Because you can't drive in space...":sync:wait 3000:level=1
start: fog distance 500 : fog color rgb(0,0,0) : ink rgb(255,255,255),rgb(0,0,0):sync:center text 320,240, "Get ready!":sync:
wait 3000:time=1000*level:shield=100:bullets=bullets+level*3:do : move object 3,5: scroll object texture 2, 0,-0.003: ink RGB(0,0,255),0:box 4,0,315,20,rgb(200,200,200),rgb(200,200,200),rgb(200,200,200),rgb(200,200,200):box 5,1,314,19,rgb(20,20,20),rgb(20,20,20),rgb(20,20,20),rgb(20,20,20): set cursor 10,2:print "S:",score: set cursor 105,2:print "T:",time:time=time-1
set cursor 180,2:print "B:",bullets:box 258,3,312,17,rgb(200,0,200),rgb(200,0,200),rgb(200,0,200),rgb(200,0,200):box 260,5,310,15,rgb(100,100,100),rgb(100,100,100),rgb(100,100,100),rgb(100,100,100): box 260,5,260+shield/2,15,rgb(0,200,0),rgb(0,0,250),rgb(0,200,0),rgb(0,0,250):if time < 0: goto finish: endif: if shield < 0: goto die:
endif: if score < 0: score=0: endif: if upkey()=1: move object 3,3: scroll object texture 2, 0,-0.002: endif: if downkey()=1: move object 3,-3: scroll object texture 2, 0,0.002: endif: if leftkey()=1 and object position x(1) > -75: move object left 1,3: endif: if rightkey()=1 and object position x(1) < 75: move object right 1,3: endif:if bullets>0:if mouseclick()=1:if mousedown=0:mousedown=1
if pick object(mousex(),mousey(),3,3)=3:ObjectDead=1:dec bullets
hide object 3:SET PARTICLE EMISSIONS 1,1000:score=score+50:endif:endif:else:mousedown=0:endif:endif:if ObjectDead=0:ink RGB(255,0,0),0:else:ink RGB(0,0,255),0:endif:line OBJECT SCREEN x(1), OBJECT SCREEN y(1), mousex(), mousey():line mousex()-15, mousey()-15, mousex()+15, mousey()-15:line mousex()+15, mousey()-15, mousex()+15, mousey()+15
line mousex()+15, mousey()+15, mousex()-15, mousey()+15:line mousex()-15, mousey()+15, mousex()-15, mousey()-15: if object position y(3)=<-50:show object 3:SET PARTICLE EMISSIONS 1,15:ObjectDead=0: position object 3,-90+rnd(180),150,0: score=score+20:
scale object 3,150+rnd(100),100+rnd(100),200+rnd(100): color object 3,RGB(50+rnd(175),50+rnd(175),50+rnd(175)): endif: dist# = (abs(object position x(1)-object position x(3))/object size x(3))^2+(abs(object position y(1)-object position y(3))/object size y(3))^2+(abs(object position z(1)-object position z(3))/object size z(3))^2: if dist# <= 1:if ObjectDead=0: score=score-3
shield=shield-3: set text size 60: CENTER text 320,240,"COLLISION ALERT!!!": set text size 20:color particles 1,100,100,250:endif: else:color particles 1,200,100,0: endif:position particle emissions 1,object position x(3),object position y(3)-object size y(3)/2,object position z(3): sync: loop
finish: fog on: fog distance 150: fog color RGB(50,50,100):box 320-162,240-52,320+162,240+52,rgb(100,100,200),rgb(100,100,200),rgb(100,100,200),rgb(100,100,200):box 320-160,240-50,320+160,240+50,rgb(100,100,100),rgb(100,100,100),rgb(100,100,100),rgb(100,100,100):center text 320,240-50, "WELL DONE!":center text 320,240-20, "Score: "+str$(score):center text 320,240+10, "Press escape to exit"
center text 320,240+30, "Press return to progress to stage "+str$(level+1):if returnkey()=1 : inc level : goto start:endif:sync : goto finish
die: fog on: fog distance 150: fog color RGB(100,50,50):box 320-122,240-52,320+122,240+52,rgb(200,100,100),rgb(200,100,100),rgb(200,100,100),rgb(200,100,100):box 320-120,240-50,320+120,240+50,rgb(100,100,100),rgb(100,100,100),rgb(100,100,100),rgb(100,100,100):center text 320,240-50, "CRAFT DESTROYED!":center text 320,240-20, "Score: "+str$(score)+" Level: "+str$(level):center text 320,240+10, "Press escape to exit"
center text 320,240+30, "Press return to reset":if returnkey()=1 : score=0 : level=1 : bullets=0 : goto start : endif: sync: goto die
Tip: Don't have any windows open behind the one that the game makes.
You are not alone.