The joystick right()/left()/up()/down() commands are pretty much useless.
do
cls : a = 0
text 0,a,"Joystick up :"+str$(joystick up()) : inc a,15
text 0,a,"Joystick down :"+str$(joystick down()) : inc a,15
text 0,a,"Joystick Y :"+str$(joystick y()) : inc a,15
text 0,a,"Joystick left :"+str$(joystick left()) : inc a,15
text 0,a,"Joystick right :"+str$(joystick right()) : inc a,15
text 0,a,"Joystick X :"+str$(joystick x()) : inc a,15
loop
Joystick up will say the joystick is up if the y axis is anything less than 0. This is useless for analog sticks because they are practically never at 0 at rest and it is impossible to move the stick only in one direction.
You have to use the joystick x() and joystick y() commands to make your own joystick direction commands like this
global joy_deadzone as integer
joy_deadzone = 200
do
cls : a = 0
text 0,a,"Joystick up :"+str$(joy_up()) : inc a,15
text 0,a,"Joystick down :"+str$(joy_down()) : inc a,15
text 0,a,"Joystick left :"+str$(joy_left()) : inc a,15
text 0,a,"Joystick right :"+str$(joy_right()) : inc a,15
loop
function joy_up()
if joystick y() < 0 - joy_deadzone then out = 1
endfunction out
function joy_down()
if joystick y() > 0 + joy_deadzone then out = 1
endfunction out
function joy_left()
if joystick x() < 0 - joy_deadzone then out = 1
endfunction out
function joy_right()
if joystick x() > 0 + joy_deadzone then out = 1
endfunction out
It might be best to allow the user to adjust joy_deadzone incase there joystick is more/less sensertive that yours.
dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard