I have a black screen when I compile it
please help me
Rem Project: Nanoatack
Rem Created: 14/09/2009 15:49:12
Rem ***** Main Source File *****
Rem Project: LoadFPSCLevel
Rem Created: 10/11/2005 16:17:22
rem Stripped down source code and steps
rem for bare bones FPSC level loading:
rem 1. Run FPSCREATOR.EXE and scroll to the TOP/LEFT/BOTTOM corner of the editing area
rem 2. Use PREFAB to make a room in this corner
rem 3. Click the BUILD GAME button to build the level as an executable
rem 4. Exit FPSCREATOR.EXE and navigate to MyGames\yourexe\
rem 5. Copy the FILES folder to this source code folder
rem 6. Delete all folders within FILES folder except 'levelbank' and 'texturebank'
rem 7. Navigate to FILES\LEVELBANK and unzip the level1.zip using 'mypassword'
rem 8. Create a new folder called TESTLEVEL
rem 9. Copy the files you have extracted to this folder, then navigate to the files
rem 10. Delete all except UNIVERSE.DBO, UNIVERSE.DBU and the LIGHTMAPS folder
rem 11. Run this source code to load and run around level
set display mode 1280,720,32
rem Definiciones
rem Bala
i = 1 : make object sphere i,0.1
rem BulletObj=3 : make object cube BulletObj,0.1
Rem Sonidos
GunSnd=1 : load sound "sounds\fire.wav",GunSnd
ImpactSnd=2 : load 3dsound "sounds\impact.wav",ImpactSnd
DieSnd=3 : load sound "sounds\die.wav",DieSnd
EnemySnd=11 : load 3dsound "sounds\enemy.wav",EnemySnd
EnemygunSnd=12 : load 3dsound "sounds\enemygun.wav",EnemygunSnd
EnemydieSnd=13 : load 3dsound "sounds\enemydie.wav",EnemydieSnd
rem Load music (WAV best for looping)
MusicSnd=101 : load sound "sounds\ingame.wav",MusicSnd
loop sound MusicSnd : set sound volume MusicSnd,70
rem imagenes
FireImg=1 : load image "images\fire.bmp",FireImg
rem Load level (load static objects read a DBO and DBU file pair)
gdividetexturesize=0 : universefile$="levelbank\testlevel\universe.dbo"
set dir "Files" : load static objects universefile$,gdividetexturesize
rem Place camera (the topmost/leftmost/lowest tile of the FPSC level universe)
position camera 450,100,-450
point camera 100,70,-100
set ambient light 3
rem Main loop
backdrop on : hide mouse
sync on : sync rate 60
rem disable escapekey
while escapekey()=0
`
rem gosub _globales
rem Control camera
gosub _camera
rem bala
gosub _bala
rem Setear Globales
rem gosub _globales
rem Update
sync
`
endwhile
rem Close level
delete static objects
rem End program
end
_camera:
rem Input source
tkeystate30=0 : tkeystate32=0 : tkeystate17=0 : tkeystate31=0
if keystate(17) then tkeystate17=1
if keystate(31) then tkeystate31=1
if keystate(30) then tkeystate30=1
if keystate(32) then tkeystate32=1
cammovex#=mousemovex()
cammovey#=mousemovey()
rem Camera old information
cox#=camera position x()
coy#=camera position y()
coz#=camera position z()
rem Control camera movement
movement=0 : speed#=3.0
x#=camera angle x() : z#=camera angle z() : sy#=camera angle y() : y#=sy#
if tkeystate30=1 then dec y#,90 : movement=1
if tkeystate32=1 then inc y#,90 : movement=1
rotate camera 0,y#,0
if tkeystate17=1 or tkeystate30=1 or tkeystate32=1 then move camera speed# : movement=1
if tkeystate31=1 then move camera speed#*-1.0 : movement=1
rotate camera x#,sy#,z#
if spacekey()=1
camaray = camera position y()
camarax = camera position x()
camaraz = camera position z()
while camera position y() < 30
position camera camarax,camaray + 1,camaraz
sleep 10
camaray = camera position y()
camarax = camera position x()
camaraz = camera position z()
position camera camarax,camaray + 1,camaraz
endwhile
endif
rem Camera new information
cmx#=camera position x()
cmy#=camera position y()-grav#
cmz#=camera position z()
rem Overall ellipse collision for camera
if static volume(cox#,coy#-20,coz#,cmx#,cmy#-20,cmz#,1.0)=1
materialtype=get static collision value()
cmx#=cox#+get static collision x()
cmy#=coy#+get static collision y()
cmz#=coz#+get static collision z()
grav#=0.5
else
inc grav#,0.5
endif
rem Stop falling forever
if cmy#<-200.0 then cmy#=-200
rem Update camera position
set point light 0,cmx#,cmy#,cmz#
position camera cmx#,cmy#,cmz#
rem Control camera view
camangx#=camera angle x()+cammovey#/1.5
camangy#=camera angle y()+cammovex#/1.5
if wrapvalue(camangx#)>85 and wrapvalue(camangx#)<180 then camangx#=85.0
if wrapvalue(camangx#)>180 and wrapvalue(camangx#)<275 then camangx#=275.0
rotate camera camangx#,camangy#,camera angle z()
cmx#=camera position x()
cmy#=camera position y()-grav#
cmz#=camera position z()
contador = 0
if spacekey()=1
while contador < 40
position camera cmx#,cmy# + 10,cmz#
rem sleep 1
remstart
cmx#=camera position x()
cmy#=camera position y()-grav#
cmz#=camera position z()
position camera cmx#,cmy# + 1,cmz#
remend
contador = contador + 1
endwhile
endif
return
_bala:
rem Arrays para las distintas balas y parametros:
rem nombre,rate of fire,velocidad,distancia max,muzzleflash,ruido,daño,cantidad(mas de uno para escopeta),animaciones
rem balas maximas,balas por cargador
rem Array de armas
dim armas$(1,14)
rem Guardar datos
rem Armas
armas$(0,0) = "Colt.45"
armas$(0,1) = " "
armas$(0,2) = ""
armas$(0,3) = " "
armas$(0,4) = " "
armas$(0,5) = " "
armas$(0,6) = " "
armas$(0,7) = " "
armas$(0,8) = " "
armas$(0,9) = " "
armas$(0,10) = " "
armas$(0,11) = " "
armas$(0,12) = " "
armas$(0,13) = " "
armas$(0,14) = " "
rem make ammo
ammo = 100
loopammo = ammo
rem make bullet array
dim bullet(ammo,1)
rem loop and create bullet
for i = 1 to loopammo
bullet(i,1)=0
rem make object sphere i,1
next i
rem now to get to the bullet
rem check if current bullet is inactive(0)
if mouseclick()= 1 and bullet(ammo,1)=0
bullet(ammo,1)=1
play sound GunSnd
endif
if mouseclick()= 1 and bullet(ammo,1)=1
rem go to set up bullet and positionig
bullet(ammo,1)=2
ammo = ammo - 1
endif
rem loop the bullets
for i = 1 to loopammo
rem position bullet with camera and rotate it to the same way
rem the camera is positioned
if bullet(i,1)=2
position object i,camera position x(0),camera position y(0),camera position z(0)
rotate object i,camera angle x(0),camera angle y(0),0
rem now bullet is ready
bullet(i,1)=3
endif
rem check if bullet is ready
if bullet(i,1)=3
endif
rem begin moveing the bullet
set bsp object collision 2,i,0.1,1
contador = 0
vida = 1
if bsp collision hit(2)=1
position sound ImpactSnd,object position x(i), object position y(i), object position z(i)
play sound ImpactSnd
bulletimpact=0
vida=0
endif
do
if vida = 1
contador = contador + 1
sleep 1
contador = contador + 1
move object i,contador
endif
loop
next i
rem print how much ammo left
set cursor 0,0
print ammo
sync
remstart
rem Control gun firing
if and bullet=-50
bullet=100
play sound GunSnd
position object BulletObj,camera position x(0),camera position y(0),camera position z(0)
rotate object BulletObj,camera angle x(0),camera angle y(0),0
set bsp object collision 2,BulletObj,0.1,1
move object BulletObj,0.2
rem *ADDCODE* TUT9B
if particles exist(1)=1 then delete particles 1
make particles 1, FireImg, 50, 0.5
set particle emissions 1,10
set particle speed 1,0.01
endif
rem Control life of bullet
if bullet>0
rem If bullet collides with BSP world
if bsp collision hit(2)=1 or bulletimpact=1
rem End bullet on wall
position sound ImpactSnd,object position x(BulletObj), object position y(BulletObj), object position z(BulletObj)
play sound ImpactSnd
bulletimpact=0
bullet=0
else
rem Move bullet
dec bullet
move object BulletObj,0.5
endif
rem *ADDCODE* TUT9C
rem Update particle using bullet object position
set particle emissions 1,1+(bullet/10)
rotate particles 1,90-object angle x(BulletObj),object angle y(BulletObj)+180,0
position particles 1,object position x(BulletObj),object position y(BulletObj),object position z(BulletObj)
rem Bullet dies
if bullet=0
rem *ADDCODE* TUT9D
set particle emissions 1,0
set bsp collision off 2
endif
else
rem Gun recharge phase
if bullet>-50 then dec bullet
endif
remend
return