who knows this simple code might be useful.
Map$ = "HI:]"
set text size 96
print Map$
get image 1,0,0,text width(Map$), text height(Map$)
make matrix 1,1000,1000,text width(Map$), text height(Map$)
prepare matrix texture 1,1,1,1
Rem Read the height map and adjust the matrix height
for x=text width(Map$) to 0 step -1
for y=text height(Map$) to 0 step -1
R=RGBR(point(x,y))
H=R*0.2
set matrix height 1,x,y,H
next y:next x
update matrix 1
set matrix 1,0,1,1,1,1,1,1
gosub Camera_Setup
sync on
do
gosub Camera_Free_Loop
set text size 10 : text 0,0,"move with wasd + mouse, to speed up keep shift pressed"
sync
loop
Camera_Setup:
dummyCam = 1
MAKE OBJECT BOX dummyCam, 5, 5, 5 : HIDE OBJECT dummyCam
REM POSITION THE START CAMERA
POSITION OBJECT dummyCam, 50, 150, 50
point object dummyCam, 50,0,50
camMoveSpeed# = 0.1 : mouseSpeed = 5
RETURN
`-----------FREE CAMERA LOOP-----------
Camera_Free_Loop:
if shiftkey() > 0
inc camMoveSpeed#, 0.1
if camMoveSpeed# => 10.0 then camMoveSpeed# = 10.0
else
if camMoveSpeed# > 1.0
dec camMoveSpeed#, 0.1
if camMoveSpeed# =< 1.0 then camMoveSpeed# = 1.0
endif
endif
if keystate(17)=1 then MOVE OBJECT dummyCam, camMoveSpeed#
if keystate(30)=1 then MOVE OBJECT LEFT dummyCam, camMoveSpeed#
if keystate(31)=1 then MOVE OBJECT dummyCam, -camMoveSpeed#
if keystate(32)=1 then MOVE OBJECT RIGHT dummyCam, camMoveSpeed#
rem camera rotation
camAngX# = wrapvalue((mousemovey() / mouseSpeed) + camAngX#)
camAngY# = wrapvalue((mousemovex() / mouseSpeed) + camAngY#)
rem stops mouse from going upside down
if camAngX# > 80 and camAngX# < 180 then camAngX# = 80
if camAngX# > 180 and camAngX# < 310 then camAngX# = 310
ROTATE OBJECT dummyCam, camAngX#, camAngY#, object angle z(dummyCam)
camPosX# = object position x(dummyCam)
camPosY# = object position y(dummyCam)
camPosZ# = object position z(dummyCam)
camAngX# = object angle x(dummyCam)
camAngY# = object angle y(dummyCam)
camAngZ# = object angle z(dummyCam)
POSITION CAMERA 0, camPosX#, camPosY#, camPosZ#
ROTATE CAMERA 0, camAngX#, camAngY#, object angle z(dummyCam)
RETURN