Ok, I have the impression nobody is goinr to help me unless I show them something.
Engine 1:
rem start the game
autocam off
hide mouse
rem load images and textures
load image "aliengrass.bmp",1
load image "plasmabullet.bmp",2
rem load sounds
load sound "laser.wav",1
rem load objects
make object plain 2,30,30
texture object 2,2
ghost object on 2
hide object 2
make object plain 4,40,40
position object 4,0,300,0
hide object 4
rem create world
fog off
fog distance 2000
fog color rgb(0,0,5)
color Backdrop RGB(0,150,0)
rem make matrix
make matrix 1,40000,40000,10,10
randomize matrix 1,150.0
set matrix height 1,10,10,200.0
update matrix 1
prepare matrix texture 1,1,1,1
rem set camera and sync
set camera range 1,3000
sync on
sync rate 60
rem begin game loop
do
rem position camera at location and rotation of object 4
position camera object position x(4),object position y(4),object position z(4)
rotate camera object angle x(4),object angle y(4),object angle z(4)
rem define camera variables
wvtx=object angle x(4)
wvty=object angle y(4)
wvtz=object angle z(4)
wcax=wrapvalue(wvtx)
wcay=wrapvalue(wvty)
wcaz=wrapvalue(wvtz)
rem controls
cya#=wrapvalue(cya#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
if cxa#<-45.0 then cxa#=-45.0
if cxa#>45.0 then cxa#=45.0
cx#=newxvalue(x#,cya#,sin(cxa#)*10)
cz#=newzvalue(z#,cya#,sin(cxa#)*10)
rotate camera wrapvalue(cxa#),cya#,0
rotate object 4,0,camera angle y(),0
position camera object position x(4),object position y(4),object position z(4)
rem walking
if keystate(17)=1 then move object 4,18
if keystate(31)=1 then move object 4,-18
rem shooting
if mouseclick()=1 and dst=0
shot=1
bdst=1
show object 2 :position object 2,object position x(4),object position y(4)-1,object position z(4):play sound 1
rotate object 2,camera angle x(),camera angle y(),camera angle z()
endif
if object position x(2)<0 or object position x(2)>4000 or object position z(2)>4000 or object position z(2)<0 or object position y(2)<0 or object position y(2)>1000
hide object 2
dst=0
shot=0
endif
if shot=1
dst=dst+1
bdst=bdst+1
endif
if shot=1
move object 2,100
dst=dst+1
endif
rem end loop
sync
loop
Engine 2:
rem sync
sync on
sync rate 60
rem hide mouse
hide mouse
rem turn off autocam
autocam off
rem load player bullet image
load image "plasmabullet.bmp",2
rem load textures
load image "aliengrass.bmp",3
rem load bullet sound
load sound "laser.wav",1
load sound "engine.wav",2
rem make crosshairs
make object plain 1,20,20
position object 1,0,0,200
lock object on 1
ink rgb(255,255,255),0
circle 16,16,13 : circle 16,16,4
get image 1,0,0,32,32
texture object 1,1
set object 1,1,0,0
rem make scene
set camera range 1,5500
make matrix 1,6000,6000,25,25
position matrix 1,-3000,0,-3000
rem make the main firing object
make object plain 4,40,40
hide object 4
rem make player bullet
make object plain 2,50,50
texture object 2,2
ghost object on 1
rem main loop
do
rem fix mouse pointer
position mouse 320,240
rem camera angles
cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
cz#=wrapvalue(cz#+mousemovez())
rotate camera cx#,cy#,cz#
rem position main firing object at camera
position camera object position x(4),object position y(4),object position z(4)
rotate camera object angle x(4),object angle y(4),object angle z(4)
rem movement
if upkey()=1 then move camera 25
if downkey()=1 then move camera -25
rem shooting
if mouseclick()=1 and dst=0
shot=1
bdst=1
show object 2 :position object 2,object position x(4),object position y(4)-1,object position z(4):play sound 1
rotate object 2,camera angle x(),camera angle y(),camera angle z()
endif
if object position x(2)<0 or object position x(2)>4000 or object position z(2)>4000 or object position z(2)<0 or object position y(2)<0 or object position y(2)>1000
hide object 2
dst=0
shot=0
endif
if shot=1
dst=dst+1
bdst=bdst+1
endif
if shot=1
move object 2,100
dst=dst+1
endif
rem update screen
sync
rem end loop
loop
Both of them are messed up. The first one. The first engine can't fly, I cant figure out how to make it fly with its camera variable set up.
The second one. The second engine can't shoot properly, I actually have the first shooting code in a different form.
Either way I still have a ton of work to do on this game, so far I have to games, and well I need to get one of them to work. Oh yeah, the weird gravity I was talking about, well it's kinda hard to explain. You know when you stop it kinda slowly sinks in the air, well firstly your in a ufo type thing, and can hover and all that jazz. And when you stop it kinda sinks and slides forward like you were in a hover craft. Well that's what I want, but the ability to fly around. I want it to fly like this game.
http://home.nycap.rr.com/bser/game.htm
Anyway, no one has answerd this thread, and if you can give me some tips, I would greatly appreciate it.
It does'nt matter what side of the road you drive on, you'll still crash...