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?http://www.amazon.com/Nintendo-Retrolink-Super-Classic-Controller-NES/dp/B002824SNS
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.
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.
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.
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.
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.
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.
If your gamepad/joystick didn't come with any such software, you can always get "joytokey".
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.
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.
Gosu 0.7.47 has just been released with this feature.
That's great jlnr! Thanks!
Retrolink SNES controller definitely works. I own and use it with Gosu.
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.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill