To OBese87's changes I added some grass.
sync on : `manual screen refresh on : ink rgb(0,150,0),0 : box 0,0,20,20 : ink rgb(0,200,0),0 : for t=1 to 20 : circle rnd(20),rnd(20),0 : next t
get image 1,0,0,20,20 : make matrix 1,4000,4000,30,30 : prepare matrix texture 1,1,2,2
randomize matrix 1,50
update matrix 1
make object box 1,24,16,20
d#=250.0 : s#=10.0 : `these never change so can go before the main loop
DO : if spacekey()=1 then move object 1,20
if controlkey()=1 then move object 1,40
if shiftkey()=1 then move object 1,30
if upkey()=1 then move object 1,10
if downkey()=1 then move object 1,5
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-8) : walk=1
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+8)
x#=object position x(1):z#=object position z(1):a#=object angle y(1)
x = x# : z = z# : `convert to integers (get ground height doesn't like reals)
y# = get ground height(1,x,z) + object size y(1)/2 : `place object at floor height, move up so that bottom of box is on floor
h# = y# + 20 : `adjust camera height to new box height
position object 1,x#,y#,z# : `update object position
set camera to follow x#,y#,z#,a#,d#,h#,s#,1
sync : loop
I never tell the truth.
That ain't a paradox.
I always tell lies is though.