`display
set display mode 1152,864,32
hide mouse
sync on
sync rate 0
`fog
fog on
fog color rgb(0,0,0)
fog distance 2000
set ambient light 100
`backdrop
backdrop on
color backdrop rgb(0,0,0)
position camera 250,500,250
`===========================================================================
` M E D I A
`===========================================================================
load image "test.bmp",1
`===========================================================================
` M A T R I X
`===========================================================================
TILE_SIZE = 50
MATRIX_SIZE_X = 500
MATRIX_SIZE_Z = 500
make matrix 1,MATRIX_SIZE_X,MATRIX_SIZE_Z,TILE_SIZE,TILE_SIZE
position matrix 1,0,0,0
prepare matrix texture 1,1,TILE_SIZE,TILE_SIZE
tile=0
for z=TILE_SIZE-1 to 0 step -1
for x=0 to TILE_SIZE-1
set matrix tile 1,x,z,tile+1
inc tile,1
next x
next z
update matrix 1
`===========================================================================
` M A I N
`===========================================================================
do
gosub _debug
x#=wrapvalue(x#+mousemovey()/4)
y#=wrapvalue(y#+mousemovex()/4)
z#=wrapvalue(z#+mousemovez()/4)
rotate camera x#,y#,z#
if upkey()=1 then move camera 2.0
if downkey()=1 then move camera -2.0
sync
loop
`============================================================================
` F U N C T I O N S
`============================================================================
`============================================================================
` S U B R O U T I N E S
`============================================================================
_debug:
if scancode()=15
text 0,0,"Frames Per Second: "+str$(fps)
text 0,10,GET DIR$()
else
fps=screen fps()
endif
return
he he.. i could do that but you miss the point, i need to terraform the matrix i.e. i wanna create a rocky landscape. The above code works in DB v1.13 but not in DBPro, there is a bug in the 'prepare matrix texture' command which is not tiling the sections correctly. ta anyway tho'
What the flame does not consume, consumes the flame.
----------------------------------------------------------------
AMD XP2100+, Geforce4Ti 4400, 512Mb DDR, Abit KX7.