Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / GetButtonState and Joysticks (AGK2) - Feature Request

Author
Message
Muckypaws
AGK Developer
13
Years of Service
User Offline
Joined: 21st Oct 2011
Location:
Posted: 4th May 2015 21:52
Hello,

I've implemented experimental Joystick Support for a PS3 Dual Shock Controller connected to a Mac (Either Bluetooth or USB).

Reading the Joystick X and Y is straight forward. however when reading the buttons, the GetButtonState and Button functions manual states that only 5 buttons are supported.

What I've discovered is that on a DualShock Controller the 5 buttons are fixed to :-

Button 1: Select Button
Button 2: Left Stick Pressed Down
Button 3: Right Stick Pressed Down
Button 4: Start Button
Button 5: D-PAD Up Button.

Although AppGameKit can't differentiate between the hardware installed. I would like to see support for more than 5 buttons, if only to cover the D-Pads, the right hand buttons and the triggers.

In the mean time though, does anyone have any ideas on how to map/remap the PS3 controllers buttons on a Mac?

Many Thanks

[href]https://www.facebook.com/WonkyPix
http://www.wonkypix.com
http://www.appstore.com/jsecconsultancyltd[/href]
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th May 2015 18:11
Try the raw joystick commands such as GetRawJoystickButtonState, they will give you access to most of the features of the joystick instead of the general button commands that try to cover multiple forms of input.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 7th May 2015 02:40
Quote: "I would like to see support for more than 5 buttons"

as paul mentioned the getrawjoystick commands should be used for gamepads. I can get ~15 buttons off my gamepads including both analogs.

www.sheldonscreations.com
Muckypaws
AGK Developer
13
Years of Service
User Offline
Joined: 21st Oct 2011
Location:
Posted: 7th May 2015 03:23
Thanks @Paul and @SoftMotion3D

I'll get the hang of AppGameKit one day

I've now implemented PS3 support in Manic Miner (at least experimental support) interestingly the Square and Triangle buttons were both registering as Button 16, hey ho...

But all up and running now

[href]https://www.facebook.com/WonkyPix
http://www.wonkypix.com
http://www.appstore.com/jsecconsultancyltd[/href]

Login to post a reply

Server time is: 2024-11-25 21:23:24
Your offset time is: 2024-11-25 21:23:24