Center text 320,140,"The Flame Wars had raged for years. The countless battles found Mods jumping through"
Center text 320,160,"Galaxies, leaving the bodies and IP adresses of noobs in their wake, desperately trying to"
center text 320,180,"lock the Pointless Threads. At the center of this turmoil lay the greatest question of all time:"
set text size 40
center text 320,200,"Which was better, DarkBASIC or FPS Creator?"  
suspend for key
cls
set text size 20
center text 320,150,"In this game you take the role of DarkBASIC, trying to defeat FPS Creator ('Cause DB is way better)."
center text 320,170,"Click on one of your ships to selected it. Then right click on it to bring up the menu. Use the arrow"
center text 320,190,"keys to choose an option. If you select fire the ship will fire straight forwards. If you select move"
center text 320,210,"You can use the arrow keys to move your ship and space to leave movement mode. Good luck,"
center text 320,230,"You only have 40 seconds to defeat FPS Creator!"
suspend for key
cls
autocam off
gosub makeimages
eoh#=100
eth#=100
o1x#=6
o1y#=2
o1z#=5
o2x#=6
o2y#=-1
o2z#=5
 
make object cube 1,1
position object 1,o1x#,o1y#,o1z#
texture object 1,1
make object cylinder 2,0.5
make mesh from object 1,2
add limb 1,1,1
offset limb 1,1,-0.5,y,z
rotate limb 1,1,0,0,90
texture limb 1,1,2
 
make object cube 3,1
position object 3,o2x#,o2y#,o2z#
texture object 3,1
make object cylinder 4,0.5
make mesh from object 2,4
add limb 3,1,2
offset limb 3,1,-0.5,y,z
rotate limb 3,1,0,0,90
texture limb 3,1,2
c=0.5
delete object 2
delete object 4
fix object pivot 1
fix object pivot 3
position camera x,y,-5
texture backdrop 3
 
o10x#=-5
o10y#=3
 
o11x#=-5
o11y#=-2
 
make object sphere 10,2
position object 10,o10x#,o10y#,5
make object sphere 11,2
position object 11,o11x#,o11y#,5
 
 
texture object 10,9
texture object 11,9
 
set object 10,1,0,0
set object 11,1,0,0
 
a#=timer()
ink rgb(255,255,255),0
loop:
do
gosub timerhandling
gosub rot
gosub cr
gosub selecthandling
gosub hrc
gosub haveyouwon
sync
loop
 
 
haveyouwon:
if object exist(10)=0 and object exist(11)=0 then gosub win
 
timerhandling:
b#=timer()-a#
set cursor 0,0
print b#/1000
if b#>40000 then goto lose
if b#>30000 then ink rgb(255,0,0),0
 
 
selecthandling:
if mousex()>object screen x(1)-40 and mousex()<object screen x(1)+35 and mousey()>object screen y(1)-40 and mousey()<object screen y(1)+35 and mouseclick()=1 then selected=1 : ghost object on 1 : wait 1*100 : ghost object off 1
if mousex()>object screen x(3)-40 and mousex()<object screen x(3)+35 and mousey()>object screen y(3)-40 and mousey()<object screen y(3)+35 and mouseclick()=1 then selected=2 : ghost object on 3 : wait 1*100 : ghost object off 3
if selected=1 then sprite 4,object screen x(1)-40,object screen y(1)-50,4 
if selected=2 then sprite 4,object screen x(3)-40,object screen y(3)-50,4
if object exist(10)=1 then sprite 10,object screen x(10)-50,object screen y(10)-50,10
if object exist(11)=1 then sprite 11,object screen x(11)-50,object screen y(11)-50,10
return
 
 
hrc:
if selected=1 and mousex()>object screen x(1)-40 and mousex()<object screen x(1)+35 and mousey()>object screen y(1)-40 and mousey()<object screen y(1)+35 and mouseclick()=2 then gosub menu
if selected=2 and mousex()>object screen x(3)-40 and mousex()<object screen x(3)+35 and mousey()>object screen y(3)-40 and mousey()<object screen y(3)+35 and mouseclick()=2 then gosub menu
 
 
cr:
if mouseclick()=4 and pointing=0 then pointing=1
if mouseclick()=3 and pointing=1 then pointing=0
 
rotate camera cx#,cy#,cz#
if pointing=1 and selected=1 then point camera o1x#,o1y#,o1z#
if pointing=1 and selected=2 then point camera o2x#,o2y#,o2z#
 
return
 
 
rot:
rotate limb 1,1,wrapvalue(c),0,90
rotate limb 3,1,wrapvalue(c),0,90
inc c,1
if object exist(10)=1 then yrotate object 10,wrapvalue(erf)
if object exist(11)=1 then yrotate object 11,wrapvalue(erf)
dec erf,5
return
 
 
cmc:
if o=0 and selected=1 then fire(1)
if o=0 and selected=2 then fire(3)
if o=1 then gosub move
if o=2 then gosub loop
gosub loop
 
 
 
makeimages:
f=30
for t=0 to 50
ink rgb(f,f,f),0
inc f,3
box t,0,t,100
next t
for t=51 to 100
ink rgb(f,f,f),0
dec f,3
box t,0,t,100
next t
f=200
for t=20 to 50
ink rgb(f,f,f),0
box t,20,t,80
dec f,5
next t
for t=50 to 80
ink rgb(f,f,f),0
box t,20,t,80
inc f,5
next t
ink rgb(255,0,0),0
box 50,20,50,80
get image 1,0,0,100,100
cls
ink rgb(100,100,100),0
box 0,0,100,100
ink rgb(0,0,0),0
box 20,20,80,80
ink rgb(255,0,0),0
box 49,20,51,80
box 20,49,80,51
get image 2,0,0,100,100
cls
ink rgb(20,20,20),0
box 0,0,400,400
ink rgb(255,255,255),0
for t=0 to 50
circle rnd(400),rnd(400),0
next t
get image 3,0,0,200,200
cls
ink rgb(0,255,0),0
box 0,0,100,5
get image 4,0,0,100,5
cls
ink rgb(255,255,0),0
box 0,0,50,50
ink rgb(10,10,10),0
box 1,1,49,49
ink rgb(100,100,255),0
set cursor 1,1
print "Fire"
set cursor 1,15
print "Move"
set cursor 1,30
print "Defend"
get image 5,0,0,51,51
cls
ink rgb(200,200,255),0
box 0,0,10,15
get image 6,0,0,11,16
cls
r=255
g=255
for t=0 to 7
ink rgb(r,g,0),0
circle 8,8,t
dec r,1
dec g,15
next t
get image 7,0,0,20,20
cls
for t=0 to 8
ink rgb(r,g,0),0
circle 8,8,t
dec r,1
dec g,15
next t
get image 8,0,0,20,20
cls
ink rgb(255,0,0),0
box 0,80,200,120
ink rgb(0,255,0),0
box 0,90,200,110
ink rgb(20,20,20),0
set text size 29
text 10,85,"FPS Creator"
get image 9,0,0,200,200
ink rgb(255,0,0),0
box 0,0,100,5
get image 10,0,0,100,5
cls
return
 
menu:
if selected=1 then sprite 5,object screen x(1),object screen y(1),5
if selected=2 then sprite 5,object screen x(3),object screen y(3),5
do
if o=0 and selected=1 then sprite 6,object screen x(1)-10,object screen y(1),6
if o=1 and selected=1 then sprite 6,object screen x(1)-10,object screen y(1)+15,6
if o=2 and selected=1 then sprite 6,object screen x(1)-10,object screen y(1)+30,6
if o=0 and selected=2 then sprite 6,object screen x(3)-10,object screen y(3),6
if o=1 and selected=2 then sprite 6,object screen x(3)-10,object screen y(3)+15,6
if o=2 and selected=2 then sprite 6,object screen x(3)-10,object screen y(3)+30,6
if upkey()=1 and o>0 then dec o,1 : wait 1*10
if downkey()=1 and o<2 then inc o,1 : wait 1*10
if returnkey()=1 then delete sprite 5 : delete sprite 6 : gosub cmc : return
sync
loop
return
 
function fire(mp)
if hwty=0 then eoh=100
if hwdy=0 then eth=100
f=40
for t=0 to 15
sprite 7,object screen x(mp)-f,object screen y(mp)-10,7
f=f+40
wait 1*1
if dead1=0 
if object screen x(mp)-f>object screen x(10)-50 and object screen x(mp)-f<object screen x(10)+50 and object screen y(mp)>object screen y(10)-10 and object screen y(mp)<object screen y(10)+10
goto skip
endif
endif
if dead2=0
if object screen x(mp)-f>object screen x(11)-50 and object screen x(mp)-f<object screen x(11)+50 and object screen y(mp)>object screen y(11)-10 and object screen y(mp)<object screen y(11)+10 then goto skip
endif
next t
skip:
delete sprite 7
sprite 8,object screen x(mp)-f,object screen y(mp)-10,8
sprite 9,object screen x(mp)-f+10,object screen y(mp),8
sprite 12,object screen x(mp)-f+10,object screen y(mp)-20,8
wait 1*10
sprite 8,object screen x(mp)-f+10,object screen y(mp)-10,8
sprite 9,object screen x(mp)-f+20,object screen y(mp)+20,8
sprite 12,object screen x(mp)-f+20,object screen y(mp)-40,8
wait 1*10
delete sprite 8
delete sprite 9
delete sprite 12
if dead1=0
if object screen x(mp)-f>object screen x(10)-50 and object screen x(mp)-f<object screen x(10)+50 and object screen y(mp)>object screen y(10)-10 and object screen y(mp)<object screen y(10)+10 then dec eoh,10 : hwty=1
endif
if dead2=0
if object screen x(mp)-f>object screen x(11)-50 and object screen x(mp)-f<object screen x(11)+50 and object screen y(mp)>object screen y(11)-10 and object screen y(mp)<object screen y(11)+10 then dec eth,10 : hwdy=1
endif
if eoh=0 and dead1=0 then delete object 10 : dead1=1 : delete sprite 10
if eth=0 and dead2=0 then delete object 11 : dead2=1 : delete sprite 11
if dead1=0 then size sprite 10,eoh,5
if dead2=0 then size sprite 11,eth,5
endfunction
 
move:
do
if object collision(1,0)=0 
oldo1x#=o1x#
oldo1y#=o1y#
endif
if object collision(3,0)=0 
oldo2x#=o2x#
oldo2y#=o2y#
endif
if selected=1
if upkey()=1 then inc o1y#,0.1
if downkey()=1 then dec o1y#,0.1
if leftkey()=1 and o1x#>-1 then dec o1x#,0.1
if rightkey()=1 and o1x#<7 then inc o1x#,0.1
endif
if selected=2
if upkey()=1 then inc o2y#,0.1
if downkey()=1 then dec o2y#,0.1
if leftkey()=1 and o2x#>-1 then dec o2x#,0.1
if rightkey()=1 and o1x#<7 then inc o2x#,0.1
endif
if spacekey()=1 then return
if object collision(1,3)=1 then o1x#=oldo1x# : o1y#=oldo1y#
if object collision(3,0)>0 then o2x#=oldo2x# : o2y#=oldo2y#
position object 1,o1x#,o1y#,o1z#
position object 3,o2x#,o2y#,o2z#
sync
loop
return
 
lose:
for t=0 to 100
center text 320,240,"You lose. Game over."
wait 1*1
next t
end
 
win:
for t=0 to 100
center text 320,200,"Well done. You ended the Flame Wars." 
center text 320,240,"Lee will be ever grateful."
wait 1*1
next t
center text 320,240,"Lee ownz"
end