Ahh! I found my 20 line challlenge entry.
Make Matrix 1,1000,1000,50,50 : Make Object Cone 1,50 : Color Object 1,rgb(0,255,0) : rotate object 1,180,0,0
Sync On : Sync Rate 30 : Hide Mouse : Position Camera 500,500,-500 : Rotate Camera 20,0,0
Do
if mouseclick()=0 then X#=X#+mousemovex() : Z#=Z#-mousemovey() : Y#=get ground height(1,X#,Z#) : position object 1,X#,Y#,Z#
if mouseclick()=1
if X#<1001 and Z#<1001 and X#>-1 and Z#>-1
Y#=Y#-mousemovey()
position object 1,X#,Y#,Z#
set matrix height 1,(X#/20),(Z#/20),Y#
update matrix 1
endif : endif
if inkey$()="s" then gosub save
Sync : Loop
Save:
dim mtx(1,50,50)
for x=0 to 50 : for z=0 to 50
mtx(1,x,z)=get matrix height(1,x,z)
next z : next x
save array "C:\level.mtx",mtx(0)
return
You can then use this load function.
Load:
dim mtx(1,50,50)
load array "C:\level.mtx",mtx(0)
for x=0 to 50 : for z=0 to 50
set matrix height 1,x,z,mtx(1,x,z)
next z : next x
update matrix 1
Obviously you can change the filename but I had to keep it to 20 lines. If you want any explanation then let me know.