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

Re: [pygame] joystick example



On Tue, 2005-09-13 at 13:34 +0200, altern wrote:
> has anyone have a good example or tutorial where joystick funcitonality 
> is explained in detail? I havent used joysticks so far so the 
> terminology is a bit weird for me

The "alien" example that comes with pygame supports a joystick. (hmm, I
think, it's been awhile since I looked). You can also play with the
"eventlist" example which will report all events from the joystick.

A basic joystick generally has two axis and a few buttons. Axis 0 is
always left/right and axis 1 is up/down. There are also advanced flight
simulator joysticks which have a lot more gadgets on them. First, the
big joysticks will have more axis on them. Things like twist, throttle
control, and even foot rudders will be counted as additional axis. The
"hats" are miniature joysticks on the joystick, They are usually
controlled by the thumb. Lastly, there are also "balls" on the joystick
which are like little trackballs on the joystick. These work sort of
like mice, but controlled with one finger. Also note that little
gamepads will still use the first two axis for the direction pad, even
though it's not really an analog axis. This is good since it keeps the
analog joysticks and gamepads somewhat similar for software.

http://www.amazon.com/gp/product/images/B00030GSJY/ref=dp_product-image-only_0/102-0809929-0151342