I tested this with a little program with one camera and a matix as a ground model then added fog, everything work great, I'm just trying to find what changed in this new project which is the longest program I've ever written . I'm at 609 lines of code now, for my skill level that's huge!
here the project---->
Rem Project: sea 2
Rem Created: 9/9/2006 5:43:38 PM
Rem ***** Main Source File *****
Set Display Mode 1024,768,32
set text font "book" : set text size 20
set text to bold : set text transparent
sync on : sync rate 0
Load Image "water/waves.bmp", 1
Load Image "water/waves.dds", 2
Load Image "water/refract.bmp", 3
LOAD IMAGE "Images/spec.bmp", 4
LOAD IMAGE "Media/hull.tga",5
LOAD IMAGE "Media/d_gun.tga",6
LOAD IMAGE "Media/prop.tga",7
LOAD IMAGE "Media/20mmflak.tga",8
LOAD IMAGE "Images/spec.bmp", 9
LOAD IMAGE "Images/hud.bmp",10
LOAD IMAGE "Media/torpedo.tga",11
LOAD IMAGE "Images/compass.tga",12
REM SKY OBJECT
Load Object "sky/sky.x", 10
rem objectScale(10, 800)
SCALE OBJECT 10,100000*1000,100000,100000*1000
rem Object Light 10, 1
set Object Fog 10, 1
Set Object Texture 10, 2, 0
Scale Object Texture 10, 10, 500, 500
Position Object 10, 0, 1000, 0
rem terrain
load object "Media/channelter.x",11
position object 11,0,-1400,0
Set Object Light 11, 1
set object cull 11,0
Set Object Fog 11, 1
rem objects
LOAD OBJECT "Media/hull.X",1
POSITION OBJECT 1,0,3,0
Set Object Light 1, 1
Set Object Fog 1, 1
LOAD OBJECT "Media/dgun_base.X",2
make mesh from object 1, 2
add limb 1, 1, 1
offset limb 1, 1, 0, .47, 16.959662
link limb 1, 0, 1
TEXTURE LIMB 1, 1, 6
LOAD OBJECT "Media/dgun.X",3
make mesh from object 2, 3
add limb 1, 2, 2
offset limb 1,2,0,.74031, 0
link limb 1, 1, 2
TEXTURE LIMB 1, 2, 6
LOAD OBJECT "Media/prop.x",4
make mesh from object 3,4
add limb 1,3,3
offset limb 1,3, 2.19856,-10.307131,-83.868813
link limb 1,0,3
TEXTURE LIMB 1, 3, 7
add limb 1,4,3
offset limb 1,4,-2.47,-10.307131,-83.868813
link limb 1,0,4
TEXTURE LIMB 1, 4, 7
LOAD OBJECT "Media/rudder.x",5
make mesh from object 4,5
add limb 1,5,4
offset limb 1,5,-2,-9.5,-88.99
link limb 1,0,5
TEXTURE LIMB 1, 5, 5
add limb 1,6,4
offset limb 1,6,2,-9.5,-88.99
link limb 1,0,6
TEXTURE LIMB 1, 6, 5
LOAD OBJECT "Media/port_dplane.x",6
make mesh from object 5,6
add limb 1,7,5
offset limb 1,7, -6.4476135,-10.094486,69.78912
link limb 1,0,7
TEXTURE LIMB 1, 7, 5
LOAD OBJECT "Media/star_dplane.x",7
make mesh from object 6,7
add limb 1,8,6
offset limb 1,8, 6.8476135,-10.094486,69.78912
link limb 1,0,8
TEXTURE LIMB 1, 8, 5
LOAD OBJECT "Media/20mm_base.x",8
make mesh from object 7,8
add limb 1,9,7
offset limb 1,9,0,8,-9.128900
link limb 1,0,9
TEXTURE LIMB 1, 9, 8
LOAD OBJECT "Media/20mm_gun.x",9
make mesh from object 8,9
add limb 1,10,8
offset limb 1,10,0,9.307491,-9.128906
link limb 1,0,10
TEXTURE LIMB 1, 10, 8
LOAD OBJECT "Media/torpedo.x",1998
LOAD OBJECT "Media/torpedo_prop.x",1999
XROTATE OBJECT 1999,90
make mesh from object 1,1999
add limb 1998,1,1
link limb 1998,0,1
offset limb 1998,1,0,.001373,-7.343774
TEXTURE LIMB 1998, 1, 11
position object 1998,2.139927,-4.648277,80.289895
DELETE OBJECT 2
DELETE OBJECT 2
DELETE OBJECT 3
DELETE OBJECT 4
DELETE OBJECT 5
DELETE OBJECT 6
DELETE OBJECT 7
DELETE OBJECT 8
DELETE OBJECT 9
hide object 1998
hide object 1999
Load Object "plain.x", 100, 2
rem objectScale(100, 1000)
SCALE OBJECT 100,1000*1000,1000*1000,1000*1000
xRotate Object 100, 90
Position Object 100, 0, 0, 0
Set Object Diffuse 100, Rgb(256,200,128)
rem Set Object Emissive 100, Rgb(128,128,128)
Set Object Specular 100, Rgb(128,128,128)
Set Object Ambience 100, Rgb(128,128,128)
Set Blend Mapping On 100, 1, 2, 3, 24
Set Blend Mapping On 100, 2, 1, 3, 4
Set Blend Mapping On 100, 3, 3, 3, 26
Set Blend Mapping On 100, 4, 2, 11, 24
Set Blend Mapping On 100, 5, 1, 11, 7
Scale Object Texture 100, 0, 500, 500
Scale Object Texture 100, 1, 1000, 1000
Set Object Light 100, 1
Ghost Object On 100, 4
rem Set Object Fog 100, 1
SET OBJECT CULL 100, 0
MAKE FIRE PARTICLES 1, 2, 5000, 0, 0, 0, 1, 10, 1
ROTATE PARTICLES 1, -90, 0, 45
SET PARTICLE EMISSIONS 1, 5000
SET PARTICLE LIFE 1,1000
SET PARTICLE CHAOS 1,0
GHOST PARTICLES ON 1, 4
SET PARTICLE VELOCITY 1, 500
hide particles 1
MAKE FIRE PARTICLES 2, 2, 5000, 0, 0, 0, 1, 10, 1
ROTATE PARTICLES 2, -90, 0, 45
SET PARTICLE EMISSIONS 2, 5000
SET PARTICLE LIFE 2,1000
SET PARTICLE CHAOS 2,0
GHOST PARTICLES ON 2, 4
SET PARTICLE VELOCITY 2, 500
hide particles 2
MAKE FIRE PARTICLES 3, 2, 5000, 0, 0, 0, 1, 10, 1
ROTATE PARTICLES 3, -90, 0, 45
SET PARTICLE EMISSIONS 2, 5000
SET PARTICLE LIFE 3,1000
SET PARTICLE CHAOS 3,0
GHOST PARTICLES ON 3, 4
SET PARTICLE VELOCITY 3, 500
hide particles 3
actcamera#=1000
forw=0
surface=1
spd#=0
leftrudder=0
rightrudder=0
waveup=1
balli#=.01
balld#=.01
tornum#=1999
tube1reloaded=1
keytimer#=timer()
DO
rem load media
if intview=0 then GOSUB _hudload
if SPACEKEY()>0 and tube1reloaded=1 then GOSUB _tube1fire
rem camera control
if INKEY$()="r" then actcamera#=1000
if INKEY$()="t" and torpedoout=1 then actcamera#=1001
if INKEY$()="y" then actcamera#=1002
if INKEY$()="u" then actcamera#=1003
gosub _camerasetup
camx#=CAMERA POSITION X (actcamera#)
camy#=CAMERA POSITION y (actcamera#)
camz#=CAMERA POSITION z (actcamera#)
hpx#=OBJECT POSITION X(1)
hpy#=OBJECT POSITION Y(1)
hpz#=OBJECT POSITION Z(1)
hullangy#=object angle y (1)
rudder1#=limb angle y (1,5)
rudder2#=limb angle y (1,6)
rudder3#=limb angle y (1,5)
rudder4#=limb angle y (1,6)
propx1#=LIMB POSITION X(1, 3)
propy1#=LIMB POSITION Y(1, 3)
propz1#=LIMB POSITION Z(1, 3)
propx2#=LIMB POSITION X(1, 4)
propy2#=LIMB POSITION Y(1, 4)
propz2#=LIMB POSITION Z(1, 4)
spy#=object position y (100)
spy2#=object position y (100)
spy#=spy#*10
spy2#=spy2#*10
tube1offsetx#=hpx#-1.739927
tube1offsety#=hpy#-4.648277
tube1offsetz#=hpz#+80.289895
if tube1reloadtime#>10000 then tube1reloaded=1
if tube1reloadtime#>180000 then torpedoout=0
if LEFTKEY()>0 then gosub _leftrudder
if RIGHTKEY()>0 then gosub _rightrudder
if INKEY$()="0" then forw=0
if INKEY$()="1" then forw=1
if INKEY$()="2" then forw=2
if INKEY$()="3" then forw=3
if INKEY$()="4" then forw=4
if INKEY$()="5" then forw=5
if INKEY$()="a" then ballinc=1
if INKEY$()="d" then ballinc=2
if INKEY$()="s" then neutralball=1
if torpedoout=1 then GOSUB _tube1timer
if torpedofired1=1 then GOSUB _torpedoperform
if ballinc=1 and surface=0 then GOSUB _ballinc
if ballinc=2 and surface=0 then GOSUB _balldec
if surface=1 and ballinc=1 then surface=0
if neutralball=1 and surface=0 then GOSUB _neutralball
if forw=0 then GOSUB _allstop
if forw=1 then GOSUB _ahead14
if forw=2 then GOSUB _ahead12
if forw=3 then GOSUB _ahead34
if forw=4 then GOSUB _aheadfull
if forw=5 then GOSUB _aheadflank
if camy#<spy# and actcamera#<>1003 then gosub _underwater
if camy#>spy# then gosub _abovewater
if rudder3#<0 then rightrudder=1 else rightrudder=0
if rudder1#>0 then leftrudder=1 else leftrudder=0
if leftrudder>0 then gosub _leftturn
if rightrudder>0 then gosub _rightturn
if waveup=1 then GOSUB _waveup
if waveup=0 then GOSUB _wavedown
if ballinc=2 and hpy#>spy# then GOSUB _resurface
rem keep skybox over the ship
POSITION OBJECT 10,CAMERA POSITION X(actcamera#),CAMERA POSITION Y(actcamera#),CAMERA POSITION Z(actcamera#)
REM MAKE CLOCKWISE ANGULAR WAKES(optionally just make them stra?ght for a better look)
ang# = WrapValue(ang# + 0.1)
Scroll Object Texture 100, 0, -Sin(ang#)*0.0001, Cos(ang#)*0.0001
Scroll Object Texture 100, 1, 0.0001, 0.0
set cursor 20,675
print "speed->":set cursor 100,675:print spd#
set cursor 20,690
print "POS X->":set cursor 100,690:print camx#
set cursor 20,705
print "POS Y->":set cursor 100,705:print hpy#
set cursor 20,720
print "POS Z->":set cursor 100,720:print camz#
set cursor 100,100: PRINT tube1reloadtime#
set cursor 100,115: PRINT tornum#
sync
LOOP
_hudload:
PASTE IMAGE 10,0,650
rem PASTE IMAGE 12,470,675
RETURN
_waveup:
if spy#<8 then move object 100,-.01
if spy#>8 then waveup=0
RETURN
_wavedown:
if spy2#>-8 then move object 100,.01
if spy2#<-8 then waveup=1
RETURN
_leftturn:
if spd#>0 then hullangy#=hullangy#-.02
if spd#>.05 then hullangy#=hullangy#-.04
if spd#>.09 then hullangy#=hullangy#-.09
YROTATE OBJECT 1, hullangy#
RETURN
_rightturn:
if spd#>0 then hullangy#=hullangy#+.02
if spd#>.05 then hullangy#=hullangy#+.04
if spd#>.09 then hullangy#=hullangy#+.09
YROTATE OBJECT 1, hullangy#
RETURN
_leftrudder:
if rudder1#<15 then rudder1#=rudder1#+3
if rudder2#<15 then rudder2#=rudder2#+3
ROTATE LIMB 1,5,0,rudder1#,0
ROTATE LIMB 1,6,0,rudder2#,0
RETURN
_rightrudder:
if rudder3#>-15 then rudder3#=rudder3#-3
if rudder4#>-15 then rudder4#=rudder4#-3
ROTATE LIMB 1,5,0,rudder3#,0
ROTATE LIMB 1,6,0,rudder4#,0
RETURN
_allstop:
if spd#>0 then spd#=spd#-.0002
move object 1, spd#
HIDE PARTICLES 1
HIDE PARTICLES 2
RETURN
_ahead14:
set cursor 50,50
print "ahead 1/4"
if spd#<.4 then spd#=spd#+.0005
if spd#>.4 then spd#=spd#-.0002
MOVE OBJECT 1, spd#
prop1=LIMB ANGLE Z(1, 3)
prop2=LIMB ANGLE Z(1, 4)
prop1=prop1+50
prop2=prop2-50
ROTATE LIMB 1, 3, 0, 0, prop1
ROTATE LIMB 1, 4, 0, 0, prop2
SHOW PARTICLES 1
SHOW PARTICLES 2
SET PARTICLE EMISSIONS 1, 1
SET PARTICLE EMISSIONS 2, 1
POSITION PARTICLES 1,propx1#,propy1#,propz1#-1
POSITION PARTICLES 2,propx2#,propy2#,propz2#-1
RETURN
_ahead12:
set cursor 50,50
print "ahead 1/2"
if spd#<.425 then spd#=spd#+.001
if spd#>.425 then spd#=spd#-.0002
MOVE OBJECT 1, spd#
prop1=LIMB ANGLE Z(1, 3)
prop2=LIMB ANGLE Z(1, 4)
prop1=prop1+60
prop2=prop2-60
ROTATE LIMB 1, 3, 0, 0, prop1
ROTATE LIMB 1, 4, 0, 0, prop2
SHOW PARTICLES 1
SHOW PARTICLES 2
SET PARTICLE EMISSIONS 1, 5
SET PARTICLE EMISSIONS 2, 5
POSITION PARTICLES 1,propx1#,propy1#,propz1#-1
POSITION PARTICLES 2,propx2#,propy2#,propz2#-1
RETURN
_ahead34:
set cursor 50,50
print "ahead 1/4"
if spd#<.475 then spd#=spd#+.002
if spd#>.475 then spd#=spd#-.0002
MOVE OBJECT 1, spd#
prop1=LIMB ANGLE Z(1, 3)
prop2=LIMB ANGLE Z(1, 4)
prop1=prop1+70
prop2=prop2-70
ROTATE LIMB 1, 3, 0, 0, prop1
ROTATE LIMB 1, 4, 0, 0, prop2
SHOW PARTICLES 1
SHOW PARTICLES 2
SET PARTICLE EMISSIONS 1, 8
SET PARTICLE EMISSIONS 2, 8
POSITION PARTICLES 1,propx1#,propy1#,propz1#-1
POSITION PARTICLES 2,propx2#,propy2#,propz2#-1
RETURN
_aheadfull:
set cursor 50,50
print "ahead full"
if spd#<.525 then spd#=spd#+.003
if spd#>.525 then spd#=spd#-.0002
MOVE OBJECT 1, spd#
prop1=LIMB ANGLE Z(1, 3)
prop2=LIMB ANGLE Z(1, 4)
prop1=prop1+75
prop2=prop2-75
ROTATE LIMB 1, 3, 0, 0, prop1
ROTATE LIMB 1, 4, 0, 0, prop2
SHOW PARTICLES 1
SHOW PARTICLES 2
SET PARTICLE EMISSIONS 1, 10
SET PARTICLE EMISSIONS 2, 10
POSITION PARTICLES 1,propx1#,propy1#,propz1#-1
POSITION PARTICLES 2,propx2#,propy2#,propz2#-1
RETURN
_aheadflank:
set cursor 50,50
print "ahead flank"
if spd#<.550 then spd#=spd#+.005
if spd#>.550 then spd#=.550
MOVE OBJECT 1, spd#
prop1=LIMB ANGLE Z(1, 3)
prop2=LIMB ANGLE Z(1, 4)
prop1=prop1+80
prop2=prop2-80
ROTATE LIMB 1, 3, 0, 0, prop1
ROTATE LIMB 1, 4, 0, 0, prop2
SHOW PARTICLES 1
SHOW PARTICLES 2
SET PARTICLE EMISSIONS 1, 15
SET PARTICLE EMISSIONS 2, 15
POSITION PARTICLES 1,propx1#,propy1#,propz1#-1
POSITION PARTICLES 2,propx2#,propy2#,propz2#-1
RETURN
_ballinc:
balli#=balli#+.02
if balli#>.1 then balli#=balli#+.015
MOVE OBJECT DOWN 1,balli#
pitch object down 1, balld/2
set cursor 955,70:print balli#
RETURN
_balldec:
balld#=balld#+.01
if balld#<.1 then balld#=balld#+.025
MOVE OBJECT up 1,balld#
pitch object up 1, balld/2
set cursor 900,50:print balld#
RETURN
_neutralball:
ballinc=0
balldec=0
neutralball=0
RETURN
_resurface:
set cursor 900,70:print "resurface"
hpy#=-15
ballinc=0
balldec=0
surface=1
RETURN
_tube1fire:
wait 200
torpedot#=timer()
tube1reload#=timer()
torpedofired1=1
torpedoout=1
tube1reloaded=0
tornum#=tornum#+1
if tornum#<2024 then clone object tornum#,1998
if tornum#<2024 then show object tornum#
if tornum#<2024 then position object tornum#,tube1offsetx#,tube1offsety#,tube1offsetz#
if tornum#<2024 then SET OBJECT TO OBJECT ORIENTATION tornum#, 1
RETURN
_torpedoperform:
torpedotnew#=timer()
torpedolife#=torpedotnew#-torpedot#
torpedospd#=1.5
show particles 3
for t=2000 to tornum#
torvis=OBJECT EXIST(t)
if torvis=1 then torpropposx#=object position x (t)
if torvis=1 then torpropposy#=object position y (t)
if torvis=1 then torpropposz#=object position z (t)
if torvis=1 then point object t,hpx-1.7,0,0
if torvis=1 then POSITION PARTICLES 3, torpropposx#,torpropposy#,torpropposz#-18
torpropang#=LIMB ANGLE Z(t, 1)
torpropang#=torpropang#+27
rotate limb t,1,0,0,torpropang#
torpedodist#=Distance(1,t)
if torpedodist#>60 and torpedoposy#>-10 then move object down t,.1
if torpedodist#<8000 then MOVE OBJECT t,torpedospd#
if torpedodist#>8000 then hide particles 3
if torpedodist#>8000 then gosub _newtorpedo
next t
RETURN
_newtorpedo:
DELETE OBJECT tornum#
torpedofired1=0
RETURN
_keytimer:
RETURN
_tube1timer:
tube1reloadnew#=timer()
tube1reloadtime#=tube1reloadnew#-tube1reload#
RETURN
_camerasetup:
cam1#=CAMERA EXIST(1000)
cam2#=CAMERA EXIST(1001)
cam3#=CAMERA EXIST(1002)
cam4#=CAMERA EXIST(1003)
if actcamera#=1000 then GOSUB _skycamera
if actcamera#=1001 then GOSUB _torpedocamera
if actcamera#=1002 and surface=1 then GOSUB _conncamera
if actcamera#=1003 and surface=1 then GOSUB _deckguncamera
RETURN
_skycamera:
if cam2#=1 then DELETE CAMERA 1001
if cam3#=1 then DELETE CAMERA 1002
if cam4#=1 then DELETE CAMERA 1003
if cam1#=0 then MAKE CAMERA 1000
SET CURRENT CAMERA 1000
SET CAMERA RANGE 1000, .1, 5000000000
SET CAMERA FOV 1000, 50
hpx#=OBJECT POSITION X(1)
hpy#=OBJECT POSITION Y(1)
hpz#=OBJECT POSITION Z(1)
POSITION CAMERA 1000,hpx#+140,hpy#+25,hpz#-140
POINT CAMERA 1000, hpx#,hpy#,hpz#
RETURN
_torpedocamera:
if cam1#=1 then DELETE CAMERA 1000
if cam3#=1 then DELETE CAMERA 1002
if cam4#=1 then DELETE CAMERA 1003
if cam2#=0 then MAKE CAMERA 1001
SET CURRENT CAMERA 1001
SET CAMERA RANGE 1001, .1, 5000000000
SET CAMERA FOV 1001, 50
rem YROTATE CAMERA 1001,180
POSITION CAMERA 1001,torpropposx#,torpropposy#-5,torpropposz#-25
RETURN
_conncamera:
if cam1#=1 then DELETE CAMERA 1000
if cam2#=1 then DELETE CAMERA 1001
if cam4#=1 then DELETE CAMERA 1003
if cam3#=0 then MAKE CAMERA 1002
SET CURRENT CAMERA 1002
SET CAMERA RANGE 1002, .1, 5000000000
SET CAMERA FOV 1002, 50
POSITION CAMERA 1002,hpx#-2,hpy#+9,hpz#+2
rotate camera 1002, camera angle x(1002),hullangy#,camera angle z(1002)
RETURN
_deckguncamera:
if cam1#=1 then DELETE CAMERA 1000
if cam2#=1 then DELETE CAMERA 1001
if cam3#=1 then DELETE CAMERA 1002
if cam4#=0 then MAKE CAMERA 1003
SET CURRENT CAMERA 1003
SET CAMERA RANGE 1003, .1, 5000000000
SET CAMERA FOV 1003, 50
POSITION CAMERA 1003,hpx#+3,hpy#+3,hpz#+10
RETURN
_underwater:
rem FOG ON
rem FOG COLOR 0, 0, 0
rem FOG DISTANCE 10000
SET AMBIENT LIGHT 5
RETURN
_abovewater:
rem fog on
rem FOG COLOR 0, 128, 256
rem FOG DISTANCE 10000
SET AMBIENT LIGHT 100
RETURN
function Distance(Object1,Object2)
dist#=sqrt((object position x(Object1)-object position x(Object2))^2+(object position y(Object1)-object position y(Object2))^2+(object position z(Object1)-object position z(Object2))^2)
endfunction dist#
function AngleY(Object1,Object2)
angy#=atanfull(object position x(Object2)-object position x(Object1),object position z(Object2)-object position z(Object1))
endfunction angy#
Thanks for ya time guys, and PLZ keep the ideas coming. 10,000 heads is better than one, and if the one head is mine it's like 1/4 a head LOL,
JABBER