Sounds like you're probably not calling
update matrix
Randomize matrix makes very pointy landscapes, you should smooth the matrix out.
sync on
make matrix 1, 2000,2000,60,60
randomize matrix 1,200
smooth_matrix(1,60,60,3)
update matrix 1
do
gosub camera_stuff
sync
loop
REM ==========================================================================
REM Parameters:
REM matrix number
REM number of iterations
function smooth_matrix(number as integer, xsegs as integer, zsegs as integer, iter as integer)
dim heights#(xsegs, zsegs)
for t = 1 to iter
rem store original heights
for z = 0 to zsegs
for x = 0 to xsegs
heights#(x,z) = get matrix height(number, x, z)
next x
next z
for z = 0 to zsegs
for x = 0 to xsegs
count = 0
h1# = 0
h2# = 0
h3# = 0
h4# = 0
h5# = 0
h6# = 0
h7# = 0
h8# = 0
if z < zsegs
if x > 0 then h1# = heights#(x-1,z+1) : inc count
h2# = heights#(x,z+1) : inc count
if x < xsegs then h3# = heights#(x+1,z+1) : inc count
endif
if x > 0 then h4# = heights#(x-1,z) : inc count
if x < xsegs then h5# = heights#(x+1,z) : inc count
if z > 0
if x > 0 then h6# = heights#(x-1,z-1) : inc count
h7# = heights#(x,z-1) : inc count
if x < xsegs then h8# = heights#(x+1,z-1) : inc count
endif
avg# = (h1#+h2#+h3#+h4#+h5#+h6#+h7#+h8#) / count
set matrix height 1, x, z, avg#
next x
next z
next t
rem delete array
undim heights#()
endfunction
camera_stuff:
oldcx#=cx#
oldcz#=cz#
speed# = 5
if shiftkey() then speed# = 10
if upkey()=1
cx#=newxvalue(cx#,a#,speed#)
cz#=newzvalue(cz#,a#,speed#)
endif
if downkey()=1
cx#=newxvalue(cx#,a#,-speed#)
cz#=newzvalue(cz#,a#,-speed#)
endif
if leftkey()=1
cx#=newxvalue(cx#,wrapvalue(a#-90.0),speed#)
cz#=newzvalue(cz#,wrapvalue(a#-90.0),speed#)
endif
if rightkey()=1
cx#=newxvalue(cx#,wrapvalue(a#+90.0),speed#)
cz#=newzvalue(cz#,wrapvalue(a#+90.0),speed#)
endif
`if shiftkey() then inc cy#, 2
`if controlkey() then dec cy#, 2
a#=wrapvalue(a#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
if cxa#<-90.0 then cxa#=-90.0
if cxa#>90.0 then cxa#=90.0
cy# = get ground height(1,cx#,cz#)
position camera cx#,cy#+50,cz#
rotate camera wrapvalue(cxa#),a#,0
RETURN