Im done with basic player functions, you can now track the position in the level, move the player, check collision(limited), but there is no camera(i'll add that when we all decide).
Here it is(still editing it a little):
` Make the player
make object cube 1,50 : ` The player
color object 1,rgb(200,0,0) : ` Color the player red
` Position the player
position object 1,0,0,0 : ` Might need to edit
` Main Loop (more will be added in loop as game expands)
DO
` Player Variables
ppX# = object position X(1) : ` The players X position
ppY# = object position Y(1) : ` The players Y position
ppZ# = object position Z(1) : ` The players Z position
paX# = object angle X(1) : ` The players X angle
paY# = object angle Y(1) : ` The players Y angle
paZ# = object angle Z(1) : ` The players Z angle
` Display the player positions(to track them, part of temp. GUI)
set cursor 0,0
PRINT "Player X: ";ppX#; : ` Prints the players X position
set cursor 0,20
PRINT "Player Y: ";ppY#; : ` Prints the players Y position
set cursor 0,40
PRINT "Player Z: ";ppZ#; : ` Prints the players Z position
` Player movement (if left goes right, change the '-5' to '+5')
if upkey()=1 then move object 1,2 : ` Adjust the '2' to change speed
if downkey()=1 then move object 1,-1 : ` Adjust the '-1' to change speed
if leftkey()=1 then Yrotate object 1,wrapvalue(paY#-5) : ` Adjust '-5' to change turn
if rightkey()=1 then Yrotate object 1,wrapvalue(paY#+5) : ` Adjust '+5' to change turn
` Refresh the screen
sync
LOOP
DBP and DBC have different speeds at which the player moves, even though they have the same number. You can edit it to however you like it.
Halo!!1one