[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] usb game controllers



On Wednesday 22 June 2005 05:33 pm, Bob the Hamster wrote:
> On Wed, Jun 22, 2005 at 04:17:51PM -0500, Terry Hancock wrote:
> > Is there any capability to support USB game controllers on 
> 
> Pygame supports joysticks nicely. See 
> http://pygame.org/docs/ref/Joystick.html
> 
> Support for USB joysticks on linux in general is quite good, although 
> some special features like vibration or force-feedback won't be 
> available.

So it appears that you are saying that even a device like this one:

http://www.cdw.com/shop/products/specs.aspx?EDC=313623
(summary*)

is still just a joystick as far as PyGame is concerned?  Is there such
a thing as a hardware compatibility guide for this, or can one
expect any of them to work?  (standard interface?)

Actually, I see the PyGame mascot is chewing on one of these, so
maybe I should've guessed.  ;-)

Now that I look more closely, I can see that PyGame's Joystick
object appears to support an arbitrary number of buttons and
other devices.

What, BTW, is a "directional hat".  The first thing that comes to mind
is a unit vector which is written with a circumflex or "hat". But maybe
this is a reference to the shape of a "thumb stick" controller?

Sorry if I'm seeming clueless here, I'm not really much of a gamer
myself, and I definitely am having trouble with jargon conflicts, I
can see.

This may have seemed really obvious to the developers' community
for PyGame, but I don't think the site is explicit enough about this
kind of support.  To someone like me who's not familiar with the
subject, it doesn't leap out as obvious that such stuff will be 
supported.  The "Newbie Guide" for example, doesn't touch on stuff
like this.   I'm going to have to think about that for a bit, maybe I
can come up with something useful for the tutorials page.


*Summary:
This is very similar to the controllers on console video games
(specifically, I think it mimics the Playstation 2's controller, but
GameCube and  Xbox controllers are very similar).

The device has more controls than a single joystick:

2 "thumb sticks"
1 "8-way cross keypad"
13 buttons (I see four on the right side, looks like 3 macro buttons
and probably one "left" and "right" buttons along the top).

I'm not particularly into this particular one, but there are several
such devices for sale that have more or less the same interface.

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com