I tried your code and never got a problem.
Quote: "How do I keep my 'player' inside the map and not fall through the floor?"
this is because the terrain object beign put at y>60. get back to your design software and place it at y=0 for the floor, so results will be predictable.
Quote: "SELECT MOUSECLICK()
CASE 1: `move forward
PHY MOVE CHARACTER CONTROLLER playerobj, 0.1
MOVE OBJECT playerobj,0.1
ENDCASE
CASE 2: `move backward
PHY MOVE CHARACTER CONTROLLER playerobj, -0.1
MOVE OBJECT playerobj,-0.1
ENDCASE
CASE DEFAULT: `don't move at all
PHY MOVE CHARACTER CONTROLLER playerobj, 0.0
MOVE OBJECT playerobj,0.0
ENDCASE
ENDSELECT "
better option:
Quote: "PHY MOVE CHARACTER CONTROLLER playerobj,((MOUSECLICK()=1)-(MOUSECLICK()=2))*50"
Quote: "about the speed:"
use: sync on : sync rate 60 so you can use human eye speed and natural human movement.
move_speed= 50 to 60
I wrote the code for you again:
SYNC ON
SYNC RATE 60
PHY START
//HIDE MOUSE
AUTOCAM OFF
MAKE CAMERA 1
`set main constants
#CONSTANT playerobj = 1
#CONSTANT worldobj = 2
`set up the scene
POSITION CAMERA 1,-230,75,-239
LOAD OBJECT "simpletest.x",worldobj
POSITION OBJECT worldobj,0,0,0
`make a player object
MAKE OBJECT BOX playerobj,10,35,10
`get camera angles for reference later
camx# = CAMERA ANGLE X(1)
camz# = CAMERA ANGLE Y(1)
`this should set both objects up for collision using darkPHYSICS ( or this could be where the problem is )
`set world as terrain
PHY MAKE RIGID BODY STATIC TERRAIN worldobj
`sey character controller
PHY MAKE BOX CHARACTER CONTROLLER playerobj,CAMERA POSITION X(1),CAMERA POSITION Y(1),CAMERA POSITION Z(1),10,35,10,1,1.0,1.0
`main loop
Do
`used for player to look around
camy# = WRAPVALUE(MOUSEMOVEX() + camy#)
camx# = MOUSEMOVEY() + camx#
IF camx# > 90 THEN camx# = 90
IF camx# < -90 THEN camx# = -90
Rotate CAMERA 1, camx#,camy#,CAMERA ANGLE Z(1)
ROTATE OBJECT playerobj,camx#,camy#,OBJECT ANGLE Z(playerobj)
PHY MOVE CHARACTER CONTROLLER playerobj,((MOUSECLICK()=1)-(MOUSECLICK()=2))*50
`re-position camera
POSITION CAMERA 1, OBJECT POSITION X(playerobj),OBJECT POSITION Y(playerobj),OBJECT POSITION Z(playerobj)
`update darkPHYSYICS
PHY UPDATE
SYNC
LOOP
END
I wrote the code again