Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu compatible gamepad controllers?
- - By mpthompson Date 2012-02-19 08:30
I'm using Gosu with Ruby as a platform to teach programming to both my 10 year old son and another 12 year kid that lives up our street.  They are both highly motivated to learn how to create games. It's going pretty well and I would like to add a bit more of the "video game" feel to their programming exercises by letting them use a joystick or gamepad controller in conjunction with Gosu.

My question is, what are compatible gamepad controllers that work with Gosu?  For instance would each of the following joysticks from Amazon be fully supported in Gosu on both the Windows XP/7 and Mac OSX Lion platforms?


Also, I'm a bit clueless with regards to gamepad devices?  Do these devices have analog controls supported by Gosu in addition to the on/off buttons?

Thank you for any help or suggestions which would help me avoid wasting time buying things that won't work.
Parent - - By jlnr (dev) Date 2012-02-19 15:54 Edited 2013-04-13 05:51
Gosu uses standard APIs on Windows and OS X (not Linux yet) to access gamepads. I haven't used these particular gamepads, but three others, on both systems.

A word of warning though, Gosu currently only supports a single gamepad interface. E.g. if you check for Gosu::GpButton0, it will check the first button of *any* connected gamepad...even worse, Gosu maps every d-pad and stick of any gamepad/joystick to the same Gosu::GpLeft. So if you want to use two gamepads, or even two sticks on one gamepad, you are out of luck. The downside of a very simple interface...

If you don't need this, I think the gamepads are a safe investment.
Parent - By mpthompson Date 2012-02-20 04:43
Ok, thanks for the information.  For $10 bucks it's worth giving it a try.  Support for a single gamepad should be more than sufficient for now, but hopefully one day the kids will ask me about supporting two.
Parent - - By Spooner Date 2012-02-19 23:39
If you can't get them accepted as gamepads by Gosu, you can always just map all the gamepad's buttons to regular keyboard buttons (like arrow keys on one pad and WASD on the other) and Gosu will have no problems at all.
Parent - - By IgorJorobus Date 2013-03-24 21:19
Hi Spooner, I was trying to find if it's possible to make multiple player games using joysticks. I've found this topic and it says in 2012 that Gosu doesn't support multiple joysticks, I'm wondering if now Gosu accept more than one, guess not judging by the documentation. So I'm trying to understand the solution that you gives, can you extend your explanation? Is there another way to play around with multiple joysticks in Gosu multiple player game? Thanks.
Parent - By Spooner Date 2013-03-24 21:22
Your joystick/joypad should come with software that allows them to be mapped onto key-presses. Bit like mouse software that allows you to map the buttons to specific functions. This is obviously fiddly and far from ideal, since you'd need to set this up before playing!

As far as I know there still isn't support for more than one joypad in Gosu, but I think people are working on it.
Parent - By RunnerPack Date 2013-03-25 00:28
If your gamepad/joystick didn't come with any such software, you can always get "joytokey".
Parent - - By jlnr (dev) Date 2013-03-25 02:21
The multi-gamepad code has been merged in for OS X already, but I haven't documented it because it is still missing for Windows.
Parent - - By IgorJorobus Date 2013-03-28 13:39
Understood Spooner and RunnerPack. jlnr that's a very good notice, will be another one when you release the feature for windows OS. Kind regards and thanks.
Parent - - By jlnr (dev) Date 2013-04-01 08:59
Gosu 0.7.47 has just been released with this feature.
Parent - By IgorJorobus Date 2013-04-11 18:54
That's great jlnr! Thanks!
Parent - - By Maverick Date 2012-02-20 04:59
Retrolink SNES controller definitely works. I own and use it with Gosu.
Parent - By mpthompson Date 2012-02-21 04:51 Edited 2012-02-22 22:34
Thanks for the confirmation.  I put the order in today.

Update: The controller arrived and it works perfectly with Gosu.  My son likes using it much more than the arrow keys on the keyboard for controlling objects on the screen.
Up Topic Gosu / Gosu Exchange / Gosu compatible gamepad controllers?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill