okay, I remade an engine that is similar to the original, however, this requires no media.
note that because I had to remake the entire engine basicly, many of the features are not completed.
Collision with map, for example, as well as reload, which for some strange reason sometimes gets the wrong numbers.
Here is the code if you want to put in the map which I'll load in the next post.
rem camera
sync on : sync rate 60 : set display mode 900,700,32 : hide mouse : backdrop on : color backdrop 0
rem player
make object cube 1,5 : make object collision box 1,-5,-5,-5,5,5,5,0
rem make bullets
make object sphere 2,7 : make object collision box 2,-15,-15,-15,15,15,15,0 : hide object 2
rem arrays
rem player arrays
dim life(1) as integer
dim maxammo(1) as integer
dim ammo(1) as integer
dim clip(1) as integer
dim maxclip(1) as integer
dim speed(1) as integer
dim cover(1) as integer
dim aimming(1) as integer
dim fire(1) as integer
dim reload(1) as integer
rem set player array value
life(1)=1000
maxammo(1)=1500
ammo(1)=1450
clip(1)=150
maxclip(1)=150
speed(1)=1
cover(1)=0
aimming(1)=0
fire(1)=0
reload(1)=0
rem enemy arrays
dim unit(0) as integer
dim attack(0) as integer
dim move(0) as integer
dim cover(0) as integer
dim elife(0) as integer
for x=3 to 10
unit(x)=x
make object sphere x,5 : color object x,rgb(100,0,0) : position object x,x*20, 0, x*10 : make object collision box x,-5,-5,-5,5,5,5,0:`enemies
attack(x)=0
move(x)=0
cover(x)=0
elife(x)=50
next x
REM LEVEL
make object box 100,1000,50,1000 : xrotate object 100,20 : color object 100,rgb(0,0,1000) : set object ambient 100,0
rem main loop
do
player()
position()
camera()
shoot()
AI()
death()
print screen fps()
sync
loop
rem functions
function player()
if shiftkey()=1 then speed(1)=2 : else : speed(1)=1
if inkey$()="w" then yrotate object 1,camera angle y() : move object 1,speed(1)
if inkey$()="s" then yrotate object 1,camera angle y() : move object 1,-speed(1)
if inkey$()="a" then yrotate object 1,camera angle y() : move object left 1,speed(1)
if inkey$()="d" then yrotate object 1,camera angle y() : move object right 1,speed(1)
rem rotate object
yrotate object 1, camera angle y()
endfunction
function position()
height=100-intersect object(100,object position x(1),100,object position z(1),object position x(1),-100,object position z(1))
position object 1,object position x(1),curvevalue(height,object position y(1),speed(1))+2,object position z(1)
endfunction
function camera()
yrotate camera camera angle y()+mousemovex()*0.1
camX#=camera angle x()
inc camX#,mousemovey()*0.09
if camX# > 35 then camX# = 35
if camX# <-15 then camX# = -15
xrotate camera camX#
position camera object position x(1),object position y(1)+5,object position z(1)
move camera -10 : yrotate camera camera angle y()-90 : move camera -5 : yrotate camera camera angle y()+90
rem hud
set cursor 0,0 : print clip(1);"/";ammo(1)
circle screen width()/2, screen height()/2,5
endfunction
function shoot()
BDIST=sqrt( (object position x(1)-object position x(2))^2 + (object position y(1)-object position y(2))^2 + (object position z(1)-object position z(2))^2)
if clip(1)>0 and mouseclick()=1 then position object 2,camera position x(),camera position y(), camera position z() : set object to camera orientation 2 : fire(1)=1
if fire(1)=1 and BDIST<500 and clip(1)>0 then move object 2,50: dec clip(1),1
rem reload
if spacekey()=0 then reload(1)=0
if spacekey()=1 and ammo(1)>=maxclip(1) and clip(1)<maxclip(1) and clip(1)>=0 and reload(1)=0 then reload(1)=1 : clip(1)=maxclip(1) : ammo(1)=ammo(1)-maxclip(1)
if spacekey()=1 and ammo(1)<maxclip(1) and ammo(1)>0 and clip(1)<maxclip(1) and reload(1)=0 then reload(1)=1 : clip(1)=ammo(1) : ammo(1)=0
endfunction
function AI()
for x=3 to 10
if elife(x)>0
rem distance
DIST=sqrt( (object position x(1)-object position x(x))^2 + (object position y(1)-object position y(x))^2 + (object position z(1)-object position z(x))^2)
if DIST<150 then point object x,object position x(1), object position y(x), object position z(1)
rem the distance is short, move quickly
if DIST<20 and object collision(x,0)=0 then move object x,1 : move(x)=1
rem if the distance is longer, but still short, move slowly
if DIST<150 and object collision(x,0)=0 then move object x,1*0.5 : move(x)=1
rem attack
if object collision(x,1)=1 then PRINT "ATTACK" : dec life(1),1
rem collision
if object collision(x,0)=1 then dec object position x(x),get object collision x():dec object position z(x),get object collision z()
rem positioning
position object x, object position x(x),100-intersect object(100,object position x(x),100,object position z(x),object position x(x),-100,object position z(x))+6,object position z(x)
rem dead
EDIST=sqrt( (object position x(2)-object position x(x))^2 + (object position y(2)-object position y(x))^2 + (object position z(2)-object position z(x))^2)
if EDIST<10 then hide object x : set object collision off x
endif
next x
endfunction
function death()
if life(1)<600 then fog on : fog distance 1000 : fog color rgb(100,0,0)
if life(1)<400 then fog on : fog distance 800 : fog color rgb(400,0,0)
if life(1)<100 then fog on : fog distance 500 : fog color rgb(1000,0,0)
if life(1)<0 then cls : sync : PRINT "GAME OVER" : sync : wait key : end
endfunction