We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Game controller support
Game controller support
Hi,
Here a patch for adding GLFW joystick support on the desktop. I don't have a pull request because couldn't run latest cocos2d-x from git.
Thanks
Hey guys, it's really exciting to hear that Joystick Support is officially on the way. I give you my total support and availability to help testing it. That's definitely one of the most wanted feature for Desktop Games.
Thanks for your commitment on this.
- File cocos2d-x-3_1_1-GLFW-Joystick.patch added
Hey guys,
Just a quick update. I updated my patch file to work with v3.1.1
I'm testing with a PS3 controller on an iMac and it's working fine.
Attached is the latest patch file.
Great Job! I'm looking forward for this feature..
Hey @sheado any updates in your patch?
Hey @HiramGeeks
I'm not an official cocos2d-x developer - so I'm not really sure when or if the team will integrate my patch.
I've been using the PS3 controller on the iMac with my game for weeks now and it's working fine. The only thing is that I have yet to develop key mappings because that can be complicated due to large amounts of gamepads out there. I was hoping to look into Steam's SDL mappings database to see if that's something we can apply to GLFW.
Anyway.. If you want to use the patch, try the following:
1. Make a copy of cocos2d-x v3.1.1 (in case something goes wrong)
2. cd to_the_v3.1.1_directory
3. patch < cocos2d-x-3_1_1-GLFW-Joystick.patch
You may need to modify the patch parameters to adjust for path changes. Here's more info on how to do that: http://jungels.net/articles/diff-patch-ten-minutes.html
Hi All,
It looks like PC/Mac/Linux gamepad support was not added in 3.2.
Are there any plans on implementing this? The patch above implements GLFW gamepad support - only things that need to be done are:
- adhering to the new game controller architecture
- button id mappings
Thanks
Really? I'm happy you mentioned that because I was considering staying on C2DX instead migrating to Unity 3D, but after that waiting for the 3.2 version and no joystick support, it's clear that I'm moving to Unity.
Thanks for letting us know, didn't need to waste time to figure it out.
cocos2d-x-3_1alpha1-GLFW-Joystick-patch_1alpha1-GLFW-Joystick-patch (8.5 kB) Sheado, 2014-05-22 21:14
cocos2d-x-3_1_1-GLFW-Joystick.patch - v3.1.1 GLFW joystick patch (10.9 kB) Sheado, 2014-06-04 00:32