disable systemkeys
start:
cls
print "Please enter the password"
print
input ">" ,password$
if password$ = "password"
print "want to play Quak4?"
print
input ">" ,yn$
if yn$ = "y"
set display mode 800,600,32
sync on: hide mouse: set ambient light 20: set text size 24
for i=0 to 31
ink rgb(i*8,i*8,i*8),0
line 0,i,31,i
ink rgb(sin(i*5.625)*255,sin(i*5.625)*255,0),0
line i,32,i,63
next i
get image 1,0,0,31,31
get image 2,30,30,31,31
get image 3,0,32,31,63
data -1, -1, 0, -1, 1, -1, 2, -1, 3, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, -1, 14, -1, 15, -1, -1, 0, -1, 1, -1, 2, -1, 3, -1, 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, 9, -1, 10, 0, 10, 1, 10, 2, 10, 3, 10, 4, 10, 5, 10, 6, 10, 7, 10, 8, 10, 9, 10, 10, 10, 11, 10, 12, 10, 13, 10, 14, 10, 15, 10, 15, 0, 15, 1, 15, 2, 15, 3, 15, 4, 15, 5, 15, 6, 15, 7, 15, 8, 15, 9, 0, 4, 0, 5, 1, 1, 1, 2, 1, 7, 1, 8, 3, 0, 3, 2, 3, 4, 3, 5, 3, 7, 3, 9, 4, 2, 4, 7, 5, 1, 5, 2, 5, 7, 5, 8, 6, 4, 6, 5, 7, 0, 7, 2, 7, 3, 7, 4, 7, 5, 7, 6, 7, 7, 7, 9, 8, 0, 8, 5, 9, 0, 9, 2, 9, 3, 9, 5, 9, 8, 10, 7, 10, 8, 11, 1, 11, 3, 11, 5, 11, 7, 12, 7, 12, 9, 13, 1, 13, 2, 13, 3, 13, 5, 14, 5, 14, 7, 0, 3, 2, 9, 5, 4, 6, 1, 8, 6, 11, 2, 0, 0, 3, 6, 8, 4, 10, 9, 13, 0
dim map((114)*2)
for i=0 to ((114)*2)-1
read map(i)
next i
for i=0 to 108
if i<103
make object box i+1,200,250,200
texture object i+1,1
position object i+1,(map(i*2)*200)+100,125,(map((i*2)+1)*200)+100
make static collision box (map(i*2)*200),0,(map((i*2)+1)*200),(map(i*2)*200)+200,250,(map((i*2)+1)*200)+200
else
if light exist(i-103)=0
make light i-103
endif
set point light i-103,(map(i*2)*200)+100,25,(map((i*2)+1)*200)+100
color light i-103,rgb((sin(((i-103)-1)*90)+1)*127,(sin(((i-103)+1)*90)+1)*50,0)
endif
next i
dim player#(2,8)
for i=0 to 1
make object plain i+250,10,100
make mesh from object i+250,i+250
add limb i+250,1,i+250
offset limb i+250,0,0,50,0
offset limb i+250,1,0,50,0
rotate limb i+250,1,0,90,0
xrotate object i+250,270
fix object pivot i+250
set object i+250,1,0,0,2,0
ghost object on i+250
set alpha mapping on i+250,100
texture object i+250,3
make camera i+1
set camera aspect i+1,1.5
set camera view i+1,0,0+(300*i),800,300+(300*i)
color backdrop i+1,0
make object cylinder i+260,40
scale object i+260,100,300,100
player#(i,0)=((int(rnd(2))*6)*200)+100
player#(i,1)=((int(rnd(1))*8)*200)+100
next i
make matrix 1,3000,2000,15,10
prepare matrix texture 1,2,1,1
do
if gameover=0
for i=0 to 1
player#(i,2)=player#(i,2)+wrapvalue((keystate(32+(6*i))-keystate(30+(6*i)))*ti#*0.1*2)
rem next i?
for j=0 to 1
player#(i,j+3)=player#(i,j)
player#(i,j)=player#(i,j)+((keystate(17+(6*i))-keystate(31+(6*i)))*sin(player#(i,2)+(j*90))*ti#*0.1*4)
next j
if get static collision hit(player#(i,3)-20,80,player#(i,4)-20,player#(i,3)+20,120,player#(i,4)+20,player#(i,0)-20,80,player#(i,1)-20,player#(i,0)+20,120,player#(i,1)+20)=1
player#(i,0)=player#(i,0)-get static collision x()
player#(i,1)=player#(i,1)-get static collision z()
endif
if keystate(16+(6*i))=1 and player#(i,6)<=0
player#(i,6)=500
position object 250+i,player#(i,0),75,player#(i,1)
yrotate object 250+i,player#(i,2)
for j=1 to 100
if get static collision hit((player#(i,0)+sin(player#(i,2))*(j-1)*20)-10,70,(player#(i,1)+cos(player#(i,2))*(j-1)*20)-10,(player#(i,0)+sin(player#(i,2))*(j-1)*20)+10,80,(player#(i,1)+cos(player#(i,2))*(j-1)*20)+10,(player#(i,0)+sin(player#(i,2))*j*20)-10,70,(player#(i,1)+cos(player#(i,2))*j*20)-10,(player#(i,0)+sin(player#(i,2))*j*20)+10,80,(player#(i,1)+cos(player#(i,2))*j*20)+10)=1
scale object 250+i,100,j*20,100
exit
endif
if sqrt(((((player#(i,0)+sin(player#(i,2))*j*20))-(player#(1-i,0)))^2)+((((player#(i,1)+cos(player#(i,2))*j*20))-(player#(1-i,1)))^2))<20
player#(i,5)=player#(i,5)+1
if player#(i,5)=10
gameover=i+1
endif
player#(1-i,0)=((int(rnd(2))*6)*200)+100
player#(1-i,1)=((int(rnd(1))*8)*200)+100
player#(1-i,7)=1
scale object 250+i,100,j*20,100
exit
endif
next j
endif
if player#(i,6)>0
player#(i,6)=player#(i,6)-ti#
endif
if player#(i,6)<400
position object 250+i,-10000,0,0
endif
if player#(i,7)=1
if player#(1-i,6)>0
ink rgb(player#(1-i,6)*0.5,0,0),0
center text 400,150+(i*300),"FRAGGED!!"
else
player#(i,7)=0
endif
endif
position object 260+i,player#(i,0),60,player#(i,1)
position camera i+1,player#(i,0),100,player#(i,1)
yrotate camera i+1,player#(i,2)
ink rgb(255,255,255),0
text 20,20+(i*300),"Frags: "+str$(int(player#(i,5)))
next i
else
center text 400,300,"Player "+str$(gameover)+" wins, 10 - "+str$(player#(1-(gameover-1),5))+"!"
endif
sync
ti#=timer()-t#
t#=timer()
text 500,550,"Made By Jonathan Gover"
loop
endif
else
print "HAHAHAHAHAHAHAHAHAHAHA SUCKER!"
WAIT 1000
END
endif
*yawns a sigh of relief*, man that took a while. You really should indent your code properly when you're dealing with such a large amount of it, its way easier to check for unclosed endifs, like they said it needed an endif at the end but also an endif for the if y = "y" thing. Fixed now.
On the other side of things, WOW! Thats a great replica of quake, feels just like it, you're on your way to a good game there if you start neatening up your code (it's not the most efficient way of handling everything).
Goodluck,
RUC'