ok i know the codes a bit messy and there are a load of misalanious bits tha i have bypased for bette code etc... but my main conserns are y the fog dosent work and if n e oine has a better idea for the water efect cos it kinda looks like jelly atm ... ill try and clean it up a bit b4 i post it
VV
rem ignor this bit for now
goto 33
open to read 1,"settings.txt"
read string 1,w$
read string 1,h$
read string 1,dep$
read string 1,window$
if val(window$) = 1 : set window on : goto 33 : endif
set display mode val(w$),val(h$),val(dep$)
33:
Sync on
hide mouse
autocam off
fog on
fog color red
fog distance 20
sync rate 30
load image "bob.bmp", 1
load image "water.bmp", 2
load image "mud.bmp", 3
make matrix 1, 100,100,10,10
make matrix 2, 100,100,50,50
make matrix 3, 100,100,10,10
set gamma 255,255,255
Randomize matrix 3 , 20
randomize matrix 1 , 20
bb=1
for rw = 0 to 10
for rww = 0 to 10
set matrix height 3 , rw , rww , get matrix height(3,rw,rww)-100
next rww
next rw
update matrix 3
for aa = aa to 10
set matrix height 3 , aa , bb , Get matrix height(1,aa,bb)
set matrix height 3 , bb , aa , Get matrix height(1,bb,aa)
next aa
aa=10
for bb = bb to 10
set matrix height 3 , aa , bb , Get matrix height(1,aa,bb)
set matrix height 3 , bb , aa , Get matrix height(1,bb,aa)
next bb
update matrix 3
position matrix 2 ,0,10,0
prepare matrix texture 1 , 1 , 1 ,1
prepare matrix texture 2 , 2 , 1 ,1
prepare matrix texture 3 , 3 , 1 ,1
ghost matrix on 2
rotate camera 0, 0, 180
rem start main loop
do
r#=0
w#=0
if keystate(17) = 1
W#=W#+1
ENDIF
if keystate(31) = 1
W#=W#-1
ENDIF
if keystate(32) = 1
rotate camera wrapvalue(mousemovey),wrapvalue(camera angle y() + 90),camera angle z()
move camera 1
rotate camera wrapvalue(mousemovey),wrapvalue(camera angle y() - 90),camera angle z()
ENDIF
if keystate(30) = 1
rotate camera wrapvalue(mousemovey),wrapvalue(camera angle y() - 90),camera angle z()
move camera 1
rotate camera wrapvalue(mousemovey),wrapvalue(camera angle y() + 90),camera angle z()
ENDIF
mousemovex=mousemovex+mousemovex()
mousemovey=mousemovey+mousemovey()
rotate camera wrapvalue(mousemovey),wrapvalue(mousemovex),camera angle z()
move camera w#
xcam# = camera position x() + r#
zcam# = camera position z() + w#
ycam# = get ground height(1,xcam#,zcam#) - 4
if zcam# < get ground height(2,xcam#,zcam#): fog on : fog color red : fog distance 2 : endif
if zcam# > get ground height(2,xcam#,zcam#) : fog off : endif
position camera camera position x() , ycam# ,camera position z()
rem water bit VVVVVVVVVVVVVVV
retuna:
speedw = speedw + 1
if speedw>3 :speedw = 0 : goto retuna :endif
if mouseclick() = 1 then modifire = modifire -1
if mouseclick() = 2 then modifire = modifire +1
for rw = 1 to 50
for rww = 1 to 50
10:
rnda = rnd(2)
if rnda = 0 then goto 10
rndb# = rnd(2)
rndb# = rndb# / 100
if rnda = 1 then rndbc#=rndb#*2
rndb# = rndb#-rndbc#
final# = get matrix height(2,rw,rww)+rndb#
if final# > 1 then final# = 1
if final# < -1 then final# = -1
set matrix height 2 , rw , rww , final# + modifire
rnda = 0
rndb# = 0
rndbc# = 0
next rww
next rw
modifire = 0
update matrix 2
if keystate(33) = 1 then gosub editor
sync
loop
editor:
input "matrix: " ; matr
input "cordinate x :" ; cox#
input "cordinate y :" ; coy#
input "height modification :" ; coz#
set matrix height matr , cox# , coy# , get ground height(matr,cox#,coy#) + coz#
print "another modification ? y/n"
do
if keystate(49) = 1 : update matrix 1 : update matrix 2 : update matrix 3 : return : else : goto editor : endif
sync
loop
n e help would be gr8