sync on : autocam off : cls : sync rate 0
start:
ink rgb(100,0,0),0
box 212,200,433,282
box 212,294,433,369
box 212,383,433,459
ink rgb(255,255,255),0
set text size 70
text 262,200,"Play"
text 262,294,"Help"
text 262,383,"Quit"
do
if mousex()>212 and mousey()>200 and mousex()<433 and mousey()<282 and mouseclick()=1 then goto game
if mousex()>212 and mousey()>294 and mousex()<433 and mousey()<369 and mouseclick()=1 then gosub help
if mousex()>212 and mousey()>383 and mousex()<433 and mousey()<459 and mouseclick()=1 then end
sync
loop
help:
set text size 15
cls
center text 320,60,"It is the year 6,347,652,724. The sun has grown so large that Earth has been consumed. Humans"
center text 320,80,"were wiped out millenia ago, and the solar system is ruled by many different races of intelligent"
center text 320,100,"life. Cargo containers carry automated drones everywhere to do the work, while the alien races"
center text 320,120,"watch from their homes in space. One such cargo ship was unexpectedly fired upon by an evil"
center text 320,140,"battleship while on a depositation mission. It escaped and managed to find a safe refuge on a"
center text 320,160,"small, incredibly hot planet called Pluto. While orbiting it, searching for a safe place to land,"
center text 320,180,"it came across a derilect builing radiating massive amounts of energy. Ground control ordered"
center text 320,200,"the drones in the ship to infiltrate the building and find this power source. That is your mission."
center text 320,220,"Good Luck."
center text 320,260,"To select drones simply click on them. To move the drone that you have selected use the"
center text 320,280,"arrow keys. You must get at least one drone to the power source without being destroyed."
center text 320,300,"To move on to the next level simply move the drones off the right side of the map."
center text 320,320,"Press space to return."
while spacekey()=0
wait 1
endwhile
cls
gosub start
 
 
 
 
 
 
 
game:
cls
hide mouse
wait 1*2000
set gamma 0,0,0
center text 320,200,"A new time begins..."
~fade(1,6)
~fade(0,6)
cls
~fade(1,4)
gosub images
gosub cutscene
 
 
do
gosub mousehandle
gosub movement
gosub lazer
gosub haveloze
gosub collisionhandle
sync
loop
 
lose:
for t=0 to 500
center text 320,200,"Better luck next time."
sync
wait 1*1
next t
end
collisionhandle:
 
if selected=2
if object collision(2,0)>0 then position object 2,0,0,0 : selected=0 : inc gone,1 
endif
if selected=3
if object collision(3,0)>0 then position object 3,0,0,0 : selected=0 : inc gone,1 
endif
if selected=4
if object collision(4,0)>0 then position object 4,0,0,0 : selected=0 : inc gone,1 
endif
return
 
havewon:
if gone<3 and object visible(2)=0 and object visible(2)=0 and object visible(3)=0 then gosub win 
return
win:
for t=0 to 500
center text 320,200,"Yeah yeah, very good. Not that hard woz it?"
sync
wait 1*1
next t
end
 
 
 
haveloze:
if gone=3 then gosub lose
return
 
lazer:
sprite 6,200,0,5
inc lz,1
if lz<200 then sprite 5,100,0,5 : laser1=1
if lz>200 then delete sprite 5 : laser1=0
if lz=400 then lz=0
if lz<200 then delete sprite 6 : laser2=0
if lz>200 then sprite 6,200,0,5 : laser2=1
 
if selected=2
if object screen x(2)>85 and object screen x(2)<120 and laser1=1 then position object 2,0,0,0 : selected=0 : inc gone,1
endif
if selected=3
if object screen x(3)>85 and object screen x(3)<120 and laser1=1 then position object 3,0,0,0 : selected=0 : inc gone,1
endif
if selected=4
if object screen x(4)>85 and object screen x(4)<120 and laser1=1 then position object 4,0,0,0 : selected=0 : inc gone,1
endif
 
if selected=2
if object screen x(2)>185 and object screen x(2)<220 and laser2=1 then position object 2,0,0,0 : selected=0 : inc gone,1
endif
if selected=3
if object screen x(3)>185 and object screen x(3)<220 and laser2=1 then position object 3,0,0,0 : selected=0 : inc gone,1
endif
if selected=4
if object screen x(4)>185 and object screen x(4)<220 and laser2=1 then position object 4,0,0,0 : selected=0 : inc gone,1
endif
 
 
 
return
 
movement:
if selected>0
x#=object position x(selected)
z#=object position z(selected)
if leftkey()=1 then z#=z#-0.5
if rightkey()=1 then z#=z#+0.5
if upkey()=1 then x#=x#-0.5
if downkey()=1 then x#=x#+0.5
position object selected,x#,object position y(selected),z#
endif
return
 
 
mousehandle:
sprite 4,mousex(),mousey(),4
if mouseclick()=1 then gosub select
return
 
 
select:
if object exist(2)=1
if mousex()>object screen x(2)-20 and mousex()<object screen x(2)+10 and mousey()>object screen y(2)-10 and mousey()<object screen y(2)+10 then set object 2,0,1,1,1,0,1,0 : selected=2 : set object 3,1,1,1,1,1,1,1 : set object 4,1,1,1,1,1,1,1
endif
if object exist(3)=1
if mousex()>object screen x(3)-20 and mousex()<object screen x(3)+10 and mousey()>object screen y(3)-10 and mousey()<object screen y(3)+10 then set object 3,0,1,1,1,0,1,0 : selected=3 : set object 2,1,1,1,1,1,1,1 : set object 4,1,1,1,1,1,1,1
endif
if object exist(4)=1
if mousex()>object screen x(4)-20 and mousex()<object screen x(4)+10 and mousey()>object screen y(4)-10 and mousey()<object screen y(4)+10 then set object 4,0,1,1,1,0,1,0 : selected=4 : set object 2,1,1,1,1,1,1,1 : set object 3,1,1,1,1,1,1,1
endif
return 
 
 
cutscene:
make object cube 1,5
texture object 1,1
make object cube 2,4
make mesh from object 1,2
delete object 2
add limb 1,1,1
color limb 1,1,rgb(100,100,100)
offset limb 1,1,3,-0.5,z
position object 1,0,0,15
make object cylinder 2,4
zrotate object 2,90
make mesh from object 2,2
delete object 2
add limb 1,2,2
offset limb 1,2,-2,0,0
color limb 1,2,rgb(100,100,100)
 
position object 1,50,50,5
 
 
 
make object cube 2,1
position object 2,x,y,5
texture object 2,2
zrotate object 2,90
 
 
make object cylinder 3,0.3
make mesh from object 3,3
delete object 3
add limb 2,1,3
offset limb 2,1,0,-0.6,0.3
color limb 2,1,rgb(100,100,70)
 
 
make object cylinder 4,0.3
make mesh from object 4,4
delete object 4
add limb 2,2,4
offset limb 2,2,0,-0.6,-0.3
color limb 2,2,rgb(100,100,70)
make object cube 5,0.7
make mesh from object 5,5
delete object 5
add limb 2,3,5
offset limb 2,3,-0.5,y,z
color limb 2,3,rgb(200,100,100)
 
position object 2,50,50,5
scale object 1,500,500,500
position object 1,0,0,200
scale object 2,900,900,900
 
 
 
 
 
 
 
make object cube 3,1
position object 3,x,y,5
texture object 3,2
zrotate object 3,90
 
 
make object cylinder 7,0.3
make mesh from object 3,7
delete object 7
add limb 3,1,3
offset limb 3,1,0,-0.6,0.3
color limb 3,1,rgb(100,100,70)
 
make object cylinder 4,0.3
make mesh from object 4,4
delete object 4
add limb 3,2,4
offset limb 3,2,0,-0.6,-0.3
color limb 3,2,rgb(100,100,70)
make object cube 5,0.7
make mesh from object 5,5
delete object 5
add limb 3,3,5
offset limb 3,3,-0.5,y,z
color limb 3,3,rgb(200,100,100)
color backdrop rgb(10,10,15)
position object 3,50,50,5
scale object 3,900,900,900
 
 
 
 
 
 
 
make object cube 4,1
position object 4,x,y,5
texture object 4,2
zrotate object 4,90
 
 
make object cylinder 7,0.3
make mesh from object 3,7
delete object 7
add limb 4,1,3
offset limb 4,1,0,-0.6,0.3
color limb 4,1,rgb(100,100,70)
 
make object cylinder 8,0.3
make mesh from object 8,4
delete object 8
add limb 4,2,4
offset limb 4,2,0,-0.6,-0.3
color limb 4,2,rgb(100,100,70)
make object cube 5,0.7
make mesh from object 5,5
delete object 5
add limb 4,3,5
offset limb 4,3,-0.5,y,z
color limb 4,3,rgb(100,100,200)
position object 4,50,50,5
scale object 4,900,900,900
make matrix 1,10000,10000,10,10
position matrix 1,-5000,-450,-5000
prepare matrix texture 1,3,1,1
 
c#=400
set mipmap mode 2
for t=0 to 300 
position camera object position x(1)+15,object position y(1)+10,t
point camera object position x(1),object position y(1),object position z(1)
position object 2,object position x(1),object position y(1),object position z(1)
position object 1,0,c#,200
dec c#,2.5
sync
wait 20
next t
 
~fade(0,4)
position camera object position x(2)+70,object position y(2),object position z(2)-50
point camera object position x(2),object position y(2),object position z(2)
position object 2,object position x(1),object position y(1)-7,object position z(1)
position object 3,object position x(1)-15,object position y(1)-7,object position z(1)
position object 4,object position x(1)+15,object position y(1)-7,object position z(1)
position object 1,0,c#,200
dec c#,1.2
~fade(1,4)
repeat
position camera object position x(2)+70,object position y(2),object position z(2)-50
point camera object position x(2),object position y(2),object position z(2)
position object 2,object position x(1),object position y(1)-7,object position z(1)
position object 3,object position x(1)-15,object position y(1)-7,object position z(1)
position object 4,object position x(1)+15,object position y(1)-7,object position z(1)
position object 1,0,c#,200
dec c#,1.2
wait 20
until object position y(1)<-436 
repeat
position camera object position x(2)+70,object position y(2),object position z(1)-50
point camera object position x(2),object position y(2),object position z(2)
position object 1,0,c#,200
inc c#,1.2
sync
wait 20
until object position y(1)>-350
position camera object position x(2)+70,object position y(2),object position z(1)-50
point camera object position x(2),object position y(2),object position z(2)
position object 1,0,c#,200
inc c#,1.2
sync
wait 20
 
position object 1,0,-1000,200
for t=0 to -90 step -1
yrotate object 2,wrapvalue(t)
yrotate object 3,wrapvalue(t)
yrotate object 4,wrapvalue(t)
sync
wait 1*1
next t
wait 1*1000
 
for t=200 to 450
position object 2,object position x(2),object position y(2),t
position object 3,object position x(3),object position y(3),t
position object 4,object position x(4),object position y(4),t
sync
wait 1*20
next t
 
for t=450 to 800
position object 2,object position x(2),object position y(2),t
position object 3,object position x(3),object position y(3),t
position object 4,object position x(4),object position y(4),t
position camera object position x(4)+15,object position y(4),object position z(4)+15
point camera object position x(3),object position y(3),object position z(3)
sync
wait 1*20
next t
~fade(0,4)
position object 2,object position x(2),object position y(2),t
position object 3,object position x(3),object position y(3),t
position object 4,object position x(4),object position y(4),t
position camera object position x(2),object position y(2)+f,object position z(2)-(100+g)
point camera object position x(2),object position y(2),object position z(2)
inc f,1
inc g,2
sync
~fade(1,4)
for t=800 to 1200
position object 2,object position x(2),object position y(2),t
position object 3,object position x(3),object position y(3),t
position object 4,object position x(4),object position y(4),t
position camera object position x(2),object position y(2)+f,object position z(2)-(100+g)
point camera object position x(2),object position y(2),object position z(2)
inc f,1
inc g,2
sync
wait 1*20
next t
 
for f=0 to 240 step 5
	r=255-f
	g=255-f
	b=255-f
	set gamma r,g,b
next f
 
 
prepare matrix texture 1,10,1,1
position object 2,object position x(2),object position y(2),450
position object 3,object position x(3),object position y(3),450
position object 4,object position x(4),object position y(4),450
position camera 0,-200,600
point camera 0,-400,600
yrotate camera 270
for f=15 to 250 step 5
	r=f
	g=f
	b=f
	set gamma r,g,b
next f
color backdrop rgb(50,50,50)
position camera object position x(4)+12,object position y(4),object position z(4)+5
point camera object position x(4),object position y(4),object position z(4)
 
position object 2,object position x(2),object position y(2),450
position object 3,object position x(3),object position y(3),450
position object 4,object position x(4),object position y(4),450
position camera 0,-200,600
point camera 0,-400,600
yrotate camera 270
return
 
 
 
 
 
images:
ink rgb(100,100,100),0
box 0,0,100,100
ink rgb(170,160,160),0
box 55,0,100,100
ink rgb(255,0,0),0
box 0,48,65,52
ink rgb(20,20,255),0
box 0,0,30,1
box 0,99,30,100
box 30,0,31,47
box 30,53,31,100
ink rgb(200,200,200),0
box 90,0,100,100
get image 1,0,0,100,100
cls
ink rgb(100,100,70),0
box 0,0,50,50
ink rgb(0,100,0),1
for t=0 to 5
circle 20,20,t
next t
box 20,18,50,22
get image 2,0,0,50,50
cls
ink rgb(255,255,0),0
box 0,0,124,124
ink rgb(100,100,0),0
for t=1 to 500
a=rnd(124)
b=rnd(124)
box a,b,a,b
next t
get image 3,0,0,124,124
cls
ink rgb(250,0,0),0
circle 5,5,5
get image 4,0,0,11,11
cls
ink rgb(255,0,0),0
box 0,0,10,479
ink rgb(200,0,0),0
box 3,0,7,479
get image 5,0,0,10,479
cls
ink rgb(250,250,250),0
for t=0 to 100
a=rnd(100)
b=rnd(100)
box a,b,a,b
next t
get image 6,0,0,100,100
cls
ink rgb(0,0,255),0
a=1
for t=255 to 0 step -1
box 0,t,20,t
inc a,1
ink rgb(0,0,a),0
next t
ink rgb(0,0,0),0
box 0,254,20,255
get image 7,0,0,20,255
ink rgb(50,50,50),0
box 0,0,124,124
ink rgb(45,45,45),0
box 10,10,114,114
get image 10,0,0,124,124
return
 
FUNCTION ~fade(fade,speed)
if fade = 1
   g = 0 : add = speed*1
else
   g = 255 : add = speed*-1
endif
 
For x = 0 to 250
   set gamma g,g,g
   g = g + add
   if g < 0 then g = 0 : exit
   if g > 255 then g = 255 : exit
   sync
Next x
ENDFUNCTION