This is a new version. It includes a
navigation laser to help you dodge those pain in the butt meteorites!
Newly added:
Collision alert when ship is hitting meteorites.
This is windowed at 320x240.
set window on : set window title "SPACE DRIVE" : sync on : sync rate 60 : set display mode 320,240,16 : backdrop on : color backdrop rgb(0,0,0) : dim score(0) : score(0)=0 : dim time(0) : time(0)=3000 : dim shield(0) : shield(0)=100
make object cone 1,20 : set object collision to polygons 1 : color object 1,RGB(100,50,200) : make object cube 2,10 : scale object 2,1500,10,10 : set object collision to polygons 2 : position object 2,0,-10,0 : hide object 2
make object sphere 3,10 : xrotate object 3,90 : position object 3,-70,100,0 : set object collision to polygons 3 : scale object 3,100,100,200 : color object 3,RGB(225,225,0) : position camera 0,80,-100 : do
move object 3,5 : ink RGB(0,0,255),0 : set cursor 10,0 : print "SCORE=",score(0) : set cursor 105,0 : print "TIME LEFT=",time(0) : time(0)=time(0)-1 : set cursor 235,0 : print "SHIELD=",shield(0) : if time(0)=<0 then goto finish
if shield(0)=<0 then goto die
if score(0)=<0 then score(0)=0
if upkey()=1 then move object 3,3
if downkey()=1 then move object 3,-3
if leftkey()=1 then yrotate object 1,270 : move object 1,6
if rightkey()=1 then yrotate object 1,90 : move object 1,6
if object collision(1,2)>0=0 then move object 1,-6 else ink RGB(0,255,0),0 : LINE OBJECT SCREEN x(1), OBJECT SCREEN y(1), OBJECT SCREEN x(3), OBJECT SCREEN y(3)
if object position y(3)=<-50 then position object 3,-90+rnd(180),150,0 : score(0)=score(0)+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))
if object collision(3,1)>0=1 then score(0)=score(0)-50 : shield(0)=shield(0)-3 : set text size 30 : CENTER text 160,120,"COLLISION ALERT!!!"
sync : loop
finish:
fog on : fog distance 150 : fog color RGB(50,50,100) : set cursor 100,80 : print "WELL DONE! SCORE=",score(0) : set cursor 100,100 : print "Press escape to exit" : sync
goto finish
die:
fog on : fog distance 150 : fog color RGB(100,50,50) : set cursor 100,80 : print "CRAFT DESTROYED!" : set cursor 100,100 : print "Press escape to exit" : sync
goto die
This is windowed at 640x480.
set window on : set window title "SPACE DRIVE" : sync on : sync rate 60 : set display mode 640,480,16 : backdrop on : color backdrop rgb(0,0,0) : dim score(0) : score(0)=0 : dim time(0) : time(0)=3000 : dim shield(0) : shield(0)=100
make object cone 1,20 : set object collision to polygons 1 : color object 1,RGB(100,50,200) : make object cube 2,10 : scale object 2,1500,10,10 : set object collision to polygons 2 : position object 2,0,-10,0 : hide object 2
make object sphere 3,10 : xrotate object 3,90 : position object 3,-70,100,0 : set object collision to polygons 3 : scale object 3,100,100,200 : color object 3,RGB(225,225,0) : position camera 0,80,-100 : do
move object 3,5 : ink RGB(0,0,255),0 : set cursor 10,0 : print "SCORE=",score(0) : set cursor 105,0 : print "TIME LEFT=",time(0) : time(0)=time(0)-1 : set cursor 235,0 : print "SHIELD=",shield(0) : if time(0)=<0 then goto finish
if shield(0)=<0 then goto die
if score(0)=<0 then score(0)=0
if upkey()=1 then move object 3,3
if downkey()=1 then move object 3,-3
if leftkey()=1 then yrotate object 1,270 : move object 1,6
if rightkey()=1 then yrotate object 1,90 : move object 1,6
if object collision(1,2)>0=0 then move object 1,-6 else ink RGB(0,255,0),0 : LINE OBJECT SCREEN x(1), OBJECT SCREEN y(1), OBJECT SCREEN x(3), OBJECT SCREEN y(3)
if object position y(3)=<-50 then position object 3,-90+rnd(180),150,0 : score(0)=score(0)+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))
if object collision(3,1)>0=1 then score(0)=score(0)-50 : shield(0)=shield(0)-3 : set text size 60 : CENTER text 320,240,"COLLISION ALERT!!!"
sync : loop
finish:
fog on : fog distance 150 : fog color RGB(50,50,100) : set cursor 100,80 : print "WELL DONE! SCORE=",score(0) : set cursor 100,100 : print "Press escape to exit" : sync
goto finish
die:
fog on : fog distance 150 : fog color RGB(100,50,50) : set cursor 100,80 : print "CRAFT DESTROYED!" : set cursor 100,100 : print "Press escape to exit" : sync
goto die
And this isnt windowed at all, at 640x480.
sync on : sync rate 60 : set display mode 640,480,16 : backdrop on : color backdrop rgb(0,0,0) : dim score(0) : score(0)=0 : dim time(0) : time(0)=3000 : dim shield(0) : shield(0)=100
make object cone 1,20 : set object collision to polygons 1 : color object 1,RGB(100,50,200) : make object cube 2,10 : scale object 2,1500,10,10 : set object collision to polygons 2 : position object 2,0,-10,0 : hide object 2
make object sphere 3,10 : xrotate object 3,90 : position object 3,-70,100,0 : set object collision to polygons 3 : scale object 3,100,100,200 : color object 3,RGB(225,225,0) : position camera 0,80,-100 : do
move object 3,5 : ink RGB(0,0,255),0 : set cursor 10,0 : print "SCORE=",score(0) : set cursor 105,0 : print "TIME LEFT=",time(0) : time(0)=time(0)-1 : set cursor 235,0 : print "SHIELD=",shield(0) : if time(0)=<0 then goto finish
if shield(0)=<0 then goto die
if score(0)=<0 then score(0)=0
if upkey()=1 then move object 3,3
if downkey()=1 then move object 3,-3
if leftkey()=1 then yrotate object 1,270 : move object 1,6
if rightkey()=1 then yrotate object 1,90 : move object 1,6
if object collision(1,2)>0=0 then move object 1,-6 else ink RGB(0,255,0),0 : LINE OBJECT SCREEN x(1), OBJECT SCREEN y(1), OBJECT SCREEN x(3), OBJECT SCREEN y(3)
if object position y(3)=<-50 then position object 3,-90+rnd(180),150,0 : score(0)=score(0)+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))
if object collision(3,1)>0=1 then score(0)=score(0)-50 : shield(0)=shield(0)-3 : set text size 60 : CENTER text 320,240,"COLLISION ALERT!!!"
sync : loop
finish:
fog on : fog distance 150 : fog color RGB(50,50,100) : set cursor 100,80 : print "WELL DONE! SCORE=",score(0) : set cursor 100,100 : print "Press escape to exit" : sync
goto finish
die:
fog on : fog distance 150 : fog color RGB(100,50,50) : set cursor 100,80 : print "CRAFT DESTROYED!" : set cursor 100,100 : print "Press escape to exit" : sync
goto die
I would love some feedback on what you all think of it.
Hope you all enjoy it!
Infra-Dark
Space Drive now includes a navigation laser!