BlitzMAX joystick support

Archives Forums/Linux Discussion/BlitzMAX joystick support

Johnsprogram(Posted 2011) [#1]
This may be a bit advanced, but is there a way to get the joystick / gamepad working for any games made with BlitzMAX?


xlsior(Posted 2011) [#2]
Yes -- Blitzmax has joystick/gamepad commands built-in.

From the help:

JoyCount Counts the number of joysticks.
JoyButtonCaps Available buttons (on/off controls) on a joystick.
JoyAxisCaps Available axis (proportional controls) on a joystick.
JoyName Get the name of the joysticks connected to the specified port.
JoyDown Test the status of a joystick button.
JoyHit Check for a joystick button press
JoyX Reports the horizontal position of the joystick.
JoyY Reports the vertical position of the joystick.
JoyZ Reports the position of the joystick's Z axis if supported.
JoyR Reports the position of the joystick's R axis if supported.
JoyU Reports the position of the joystick's U axis if supported.
JoyV Reports the position of the joystick's V axis if supported.
JoyYaw Reports the position of the joystick's YAW axis if supported.
JoyPitch Reports the position of the joystick's PITCH axis if supported.
JoyRoll Reports the position of the joystick's ROLL axis if supported.
JoyHat Reports the position of the joystick's HAT controller if supported.
JoyWheel Reports the position of the joystick's YAW axis if supported.


Johnsprogram(Posted 2011) [#3]
I've tried using those, but I'm not getting anything from my gamepad. Don't get me wrong, my gamepad works, but it doesn't work when I plug it in at Ubuntu. I can get it controlled with jscal and jstest, but nothing's working in blitzMAX. When I used JoyCount(), it's always zero. JoyX & JoyY would always return zero.

Am I missing an important package or something?


Johnsprogram(Posted 2011) [#4]
I'm still not familiar to this forums, but I found something...
http://www.blitzmax.com/Community/posts.php?topic=94860
Seems to be working ok!