something like this (old code)
rem Generic Template - Scorpyo
rem Player = object 10
set display mode 1024,768,32
SYNC ON
SYNC RATE 60
backdrop on
color backdrop rgb(10,100,100)
autocam off
set global collision off
x#=2000.0:z#=1000.0:a#=0.0:s#=0.0:h#=0.0
cx#=0.0:cy#=0.0:cz#=0.0:ca#=0.0:camght=50
camrot=0:camdist=0:camlen=0
gosub Setupmatrix
gosub makeobjects
gosub resetcam
rem ----------------------------------------
do
gosub printdata
gosub objpick
SYNC
loop
rem -------------ROUTINES--------------------
objpick:
rem pick at mouse click objects from n° 100 to 120
while mouseclick()=1
objpick=pick object(mousex(),mousey(),100,120)
if objpick>100
if objpick<>lastobj
ghost object on objpick
if lastobj>100 then ghost object off lastobj
objpickx#=object position x(objpick)
objpickz#=object position z(objpick)
endif
endif
endwhile
lastobj=objpick
return
Setupmatrix:
rem ground textures
rem create texture
cls rgb(0,100,20)
inkcolor#=rgb(255,255,255)
line 0,0,0,250
line 1,1,1,250
line 2,2,2,250
line 0,0,250,0
line 1,1,250,1
line 2,2,250,2
line 0,0,250,250
line 0,250,250,0
rem next n
get image 2,0,0,250,250
rem Make landscape
landsize=4000:grid=30:mtxrandomize=30
make matrix 1,landsize,landsize,grid,grid
set matrix 1,1,0,0,1,1,1,1
prepare matrix texture 1,2,1,1
randomize matrix 1,mtxrandomize
rem ***********
rem get ground done
update matrix 1
return
rem -------CAMERA--------
Resetcam:
set camera range 1,20000
camfollow=1
camdist=-1000
camhgt=500
position camera x#,camhgt,z#-1000
return
printdata:
set cursor 0,0
print " Polys=",statistic(1)
print " FPS=",screen fps()
print " You have clicked object n° ",objpick
print " Object ",lastobj," position x,z >>>> ",objpickx#," , ",objpickz#
print " Last picked object= ",lastobj
return
rem ------------Objects-------------------
makeobjects:
cubesize=100
randomize 1
for n=100 to 120
make object cube n,100
xpos=rnd(landsize):zpos=rnd(landsize)
position object n,xpos,cubesize/2,zpos
next n
return
end