Here is what I came up with. It's not perfect, but it works. To get the coloring more uniform, you could write a routine that uses memblocks. You would have to make a memblock from the bitmap and manipulate the color data directly. It's a bit more complicated, but it is another option. If you want, I could write it for you...
sync on:sync rate 0
create bitmap 1,640,480
set current bitmap 1
`land height variable
dim heightmap(20)
`creates flat land area for ship
land=rnd(14)+2
`creates height for rest of land and draws the line
for l=1 to 20
if l=land then heightmap(l)=heightmap(l-1)
if l<>land
random:
heightmap(l)=rnd(160)+220
if heightmap(l)=heightmap(l-1) then goto random
endif
if l=1
ink rgb(255,128,0),0
line 0,220,l*32,heightmap(l)
else
line (l-1)*32,heightmap(l-1),l*32,heightmap(l)
endif
next l
`copies bitmap
get image 1,0,0,639,479
delete bitmap 1
set current bitmap 0
rem cls rgb(0,0,128)
for y= 0 to 275
paste image 1,0,y,1
next y
repeat:sync:until escapekey()=1
end