Howdy.
It seems like the correct way to proceed, you have already started experimenting with the code and altering it to suit your needs.
Regarding your question:
Quote: "2. Is there a way to translate the player movement into real world distances?"
I cant help, scale is something i havent mastered yet.
The only advice I can give now is dont forget to make your RPG.
Also I would get 'sparkys collision dll' as it makes collisions easier and more accurate.
http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5
Check this out, SKYBOX!:
heres the code:
sync on : sync rate 200
set display mode 1024,768, 32
autocam off
hide mouse
rem Load sky
load object "skybox/cloudcube.x",10
scale object 10,50000,50000,50000
rem Prepare sky object to remove shading and seams
set object light 10,0 : set object texture 10,2,0
load image "media/grass.bmp",2
make matrix 1,1000,1000,100,100
prepare matrix texture 1,2,2,2
autocam off
tl=0
for z=1 to 0 step -1
for x=0 to 1
inc tl
set matrix tile 1,x,z,tl
next x
next z
randomize matrix 1,3
update matrix 1
set camera range 1,50010 : ` gets rid of blue screen in distance
`1000 was originaly 500 0, 500 seems to set the colide for the cam at edge of map()
Setup_FPSCamera(1, 5, 1000, 0, 1000, 0, 300, 300, 5, 1, 200)
do
Update_FPSCamera(get ground height(1, object position x(__CamCube), object position z(__CamCube)),.2,.15,.15,.15, 200, 208, 203, 205)
sync
loop
`Put this before your main loop before using Update_FPSCamera()
Function Setup_FPSCamera(camobj as integer, cheight as float, xmax as float, xmin as float, zmax as float, zmin as float, xstart as float, zstart as float, ystart as float, minimap as boolean, minimapheight as float)
global __xhi as float
global __xlo as float
global __zhi as float
global __zlo as float
global __CamHeight as float
global __Minimap as boolean
__Minimap = minimap
__xhi = xmax
__xlo = xmin
__zhi = zmax
__zlo = zmin
__CamHeight = cheight
global __CamCube = camobj
make object cube __CamCube,0
position object __CamCube,xstart,ystart,zstart
if minimap
make camera 2
position camera 2,xstart,ystart + minimapheight,zstart
point camera 2,500,0,500
set camera view 2,screen width() - 300, screen height() - (screen height() - 10), screen width() - 10, screen height() - (screen height() - 300)
set camera aspect 2,1
global __map as float
__map = minimapheight
endif
current = timer()
endfunction
` Before initializing this function, make sure you place the line "Setup_FPSCamera()" somewhere before your main loop
function Update_FPSCamera(y as float, forward as float, backward as float, left as float, right as float, fkey as integer, bkey as integer, lkey as integer, rkey as integer)
position object __CamCube,object position x(__CamCube),y,object position z(__CamCube)
cstep = timer()
mmy# = mousemovey()
mmx# = mousemovex()
if mmy# > 5
mmy# = 5
endif
if mmx# > 5
mmx# = 5
endif
if cstep - current >= 10
if wrapvalue(camera angle x()) > 73 and wrapvalue(camera angle x()) < 100
xrotate camera 73
endif
if wrapvalue(camera angle x()) < 280 and wrapvalue(camera angle x()) > 260
xrotate camera 280
endif
xrotate camera wrapvalue(camera angle x() + mmy#)
yrotate camera wrapvalue(camera angle y() + mmx#)
yrotate object __CamCube,Camera angle y()
if KEYSTATE(fkey)=1 and object position x(__CamCube) < __xhi and object position x(__CamCube) > __xlo and object position z(__CamCube) < __zhi and object position z(__CamCube) > __zlo
move object __CamCube,forward
endif
if KEYSTATE(bkey)=1 and object position x(__CamCube) < __xhi and object position x(__CamCube) > __xlo and object position z(__CamCube) < __zhi and object position z(__CamCube) > __zlo
move object __CamCube,-backward
endif
if KEYSTATE(lkey)=1 and object position x(__CamCube) < __xhi and object position x(__CamCube) > __xlo and object position z(__CamCube) < __zhi and object position z(__CamCube) > __zlo
move object left __CamCube,left
endif
if KEYSTATE(rkey)=1 and object position x(__CamCube) < __xhi and object position x(__CamCube) > __xlo and object position z(__CamCube) < __zhi and object position z(__CamCube) > __zlo
move object right __CamCube,right
endif
if object position x(__CamCube) > __xhi
position object __CamCube,__xhi-.5,Object position y(__CamCube),object position z(__CamCube)
endif
if object position x(__CamCube) < __xlo
position object __CamCube,__xlo-.5,object position y(__CamCube),object position z(__CamCube)
endif
if object position z(__CamCube) > __zhi
position object __CamCube,object position x(__CamCube),object position y(__CamCube),__zhi-.5
endif
if object position z(__CamCube) < __zlo
position object __CamCube,object position x(__CamCube),object position y(__CamCube),__zlo-.5
endif
position camera object position x(__CamCube), object position y(__CamCube)+__CamHeight,object position z(__CamCube)
if __Minimap
position camera 2,camera position x(),object position y(__CamCube)+__map,camera position z()
point camera 2,camera position x(), camera position y(), camera position z()
yrotate camera 2,camera angle y()
endif
current = timer()
endif
endfunction
The skybox is attached to the post (download button, bottom right)
Nothing to see here, move along please.