Quote: "
load bitmap "dirt1.bmp",1
get image 1,0,0,50,50
delete bitmap 1
"
Don't do this, just use:
Load Image "dirt1.bmp",1
It's quicker.
Quote: "position matrix 1,-500,-5,-5.5"
You can move the matrix, but I would advise against it for now. Leave it at 0,0,0 and reposition your object/camera. Moving the matrix results in the Get Ground Height command not working as standard.
Not sure what you are doing with the For...Next loops, but it looks like you aren't sure how the command is used. You have 7 Set Matrix Tile commands in each runthrough of the loop. But there are only 4 corners to each tile!
Take a look at the tutorial on matrices here where it's covered:
http://www.computechtenerife.com/DB/tutorials.htm
You would be better using Set Matrix Height instead...
Your program, slightly ammended is below. It works fine for me in DBC - even with the Do...Loop added. I've also added a bit of mouselook code.
Gosub Setup
Do
Gosub MouseLook
sync
Loop
MouseLook:
CX#=Camera Angle X(): CY#=Camera Angle Y(): CZ#=Camera Angle Z()
CX#=Wrapvalue(CX#+mousemovey()): Rem change the - to + here if you want to invert the mouse axis
CY#=Wrapvalue(CY#+mousemovex())
Rotate Camera CX#,CY#,CZ#
Return
Setup:
Set Display Mode 800,600,16
hide mouse
sync on: Sync Rate 60
Autocam Off
load image "dirt1.bmp",1
rem Make a matrix
make matrix 1,1000,1000,11,11
rem Prepare matrix with a texture cut into a 2x2 texture grid
prepare matrix texture 1,1,2,2
rem Fill matrix with first texture tile
fill matrix 1,0.0,1
rem shape matrix SET MATRIX TILE Matrix Number, X, Z, Tile Number
for x=0 to 10
for y=0 to 10
if rnd(2)=0 then set matrix tile 1,x,y,2
set matrix tile 1,0,y,3
set matrix tile 1,10,y,3
set matrix tile 1,x,0,3
set matrix tile 1,x,10,3
set matrix tile 1,x,5,4
set matrix tile 1,x,5,4
next y
next x
update matrix 1
`make one sphere
make object sphere 1,3
position object 1,500,3,500
rem Position and point camera
Position Camera 500,10,480
Point Camera 500,0,500
Return
TDK_Man