You might like checking out something like this.
(just add your water image)
set display mode 1024, 768, 32
sync
sync on : sync rate 70 : hide mouse
autocam off
`========================================
set camera range 1.0,28000
Position Camera 200, 25, 50
`========================================
Load Image "water.bmp",1
make matrix 1, 500, 500, 25, 25
Prepare Matrix Texture 1,1,2,2
position matrix 1,0,0,0
dim waterLevel#(25,25)
dim waterRise(25,25)
createMatrix()
do
setMatrix(1)
cameracommands()
sync
loop
` *********************************************************************************
function createMatrix()
for x = 0 TO 25
for y = 0 TO 25
set matrix height 1, x,y, rnd(3)
next y
next x
update matrix 1
update matrix 1
Ghost matrix on 1,1
endfunction
function setMatrix(matrixNum)
riseVar# = .03
lowVar# = 0
highVar# = 4
for x = 0 TO 25
for y = 0 TO 25
if get matrix height(matrixNum,x,y) <= lowVar#
waterRise(x,y) = 1
endif
if get matrix height(matrixNum,x,y) >= highVar#
waterRise(x,y) = 0
endif
if waterRise(x,y) = 1
waterLevel#(x,y) = get matrix height(matrixNum,x,y)
newLevel# = riseVar#+waterLevel#(x,y)
set matrix height matrixNum, x,y,newLevel#
waterLevel#(x,y) = newLevel#
endif
if waterRise(x,y) = 0
waterLevel#(x,y) = get matrix height(matrixNum,x,y)
newLevel# = waterLevel#(x,y)-riseVar#
set matrix height matrixNum, x,y,newLevel#
waterLevel#(x,y) = newLevel#
endif
next y
next x
update matrix matrixNum
endfunction
function CameraCommands()
rotate camera camera angle x(0)+(mousemovey()/2.0),camera angle y(0)+(mousemovex()/2.0),0
cx#=camera angle x(0) : cy#=camera angle y(0)
if upkey()=1 then move camera 9.5
if downkey()=1 then move camera -2.5
angy# = camera angle y()
angx# = camera angle x()
if wrapvalue(camera angle x(0))>90 and wrapvalue(camera angle x(0))<180 then xrotate camera 0,90
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))<260 then xrotate camera 0,260
endfunction