Page 1 of 1

USB Game Controllers?

Posted: Mon May 14, 2018 12:39 am
by richardmac
Work goes very well on my proof of concept Galaga-type game. Basically I have everything working, including randomized attack patterns for my 8 baddies. I'm super happy with the results so far!

So my next thought was to try to get my game working with my usb game controller. It's an older controller, made by Game Elements, and it has a lot of buttons and USB. It works great with OpenEmu on my Mac (OS 10.13.) Searching through the forums here and also Google, basically the advice was to use rawKeyDown to trap for the buttons on the controller. Nothing registers. Nothing. I downloaded some old stacks like "PADDER" but they all used rawKeyDown. Doesn't work.

Sooooo anyone got any thoughts on this? I read there used to be some type of plugin that probably no longer works. I'm wondering about appleEvents, maybe? Any thoughts?

Re: USB Game Controllers?

Posted: Thu May 31, 2018 8:19 pm
by richmond62
Nothing registers. Nothing.
That is very queer indeed.

Here's a thought: open a text document in a text editor of your choice and
see if you get anything when pressing keys on your gamepad.

If you don't, the problem may lie with your gamepad.

I use a Nostromo Array (super-glued to a woman's hairband so that it sits still on my left thigh)
with Linux and Macintosh for repetitive guff with LiveCode, and it is "horribly" out-dated.
NG.jpg
Of course, the Nostromo series of gamepads had their own series of driver stuff:
NG2.png
I haven't tried it with OpenEMU for the plain and simple reason that its own stuff "cuts the mustard": see if you cannot find original Mac drivers for your gamepad: this may make all the difference.

Re: USB Game Controllers?

Posted: Thu May 31, 2018 8:51 pm
by richmond62
In theory (!) any USB device with buttons sends rawKeyDown and rawKeyUp
signals to a computer it is connected to.

However, this is not as easy as it seems, as operating systems tend not to know what to do
with those signals unless there is some sort of driver/interpreter between them and LiveCode.

Re: USB Game Controllers?

Posted: Tue Jun 05, 2018 11:51 pm
by richardmac
I connected the USB controller to a text editor, and nothing. So I think you're right - the OS doesn't know what to do with the input. OpenEmu likely has some generic USB game pad drivers in it, so it works well with that.

Re: USB Game Controllers?

Posted: Wed Jun 06, 2018 7:41 am
by richmond62
Out of interest, what is the make and model of your gamepad?

Re: USB Game Controllers?

Posted: Thu Jun 14, 2018 12:10 pm
by richardmac
Oops! Sorry it took me so long to respond.

It's the iBuffalo Classic USB Gamepad. I use it with OpenEmu, which lets you run old arcade games in emulation. It also runs NES, SNES, and a ton of other systems.

Aha! OK, yeah, I think I figured this out. The iBuffalo Classic USB Gamepad says nothing on the box about working on a Mac. It only says PC. It works fine with OpenEmu, but... perhaps that means OpenEmu has drivers for it? Yeah, that has to be it. OK, so I can download and install USB Overdrive and see if that works. It might. I just sort of assumed that these things were generic USB devices and the Mac would recognize it. But probably not.

Re: USB Game Controllers?

Posted: Thu Jun 14, 2018 12:25 pm
by richmond62
I just sort of assumed that these things were generic USB devices and the Mac would recognize
them.

I have fallen foul of that assumption all over the place.

Presumably what the manufacturer means (incorrectly) by "PC" (err, "Personal Computer") is a machine running a version of Microsoft Windows.

The most forgiving system re USB devices, in my experience, is Linux: but I have got myself in trouble there once or twice.

----------------

https://github.com/OpenEmu/OpenEmu/issues/1966

https://github.com/OpenEmu/OpenEmu/issues/3448

Re: USB Game Controllers?

Posted: Sun Jul 22, 2018 5:40 am
by speedbump1981
I tested a usb gamepad external that worked wonderfully well. Get in contact with Thierry Douez for the latest copy. I don't believe I have permission to distribute it, but I need to locate it first. :)

Re: USB Game Controllers?

Posted: Sun Jul 22, 2018 5:03 pm
by richmond62