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

Re: [pygame] joystick example



Kevin J. MacKenzie(e)k dio:
Hi there,



On 9/13/05 11:19 AM, "Pete Shinners" <pete@xxxxxxxxxxxx> wrote:


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


I have posted some code here that gets it started, however it doesn't seem to perfectly work with my OS X machine. Perhaps send me an e-mail and I can forward that code. It would actually be terrific trouble shooting for me, as if it works on your machine (I am assuming x86 based) then I'll be better able to debug if it my OS X drivers or my code.

sorry i am on OSX but i need to code to be crossplatform at least this is the aim.



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.



The alien.py example unfortunately only uses keyboard (K_LEFT K_RIGHT and
SPACE) is its input options.  I would also be greatly interested in more
code examples.  I have been struggling to get an event poll to interact with
a joystick as well and would love to get more information as well.

I have actually done an example based on something I found but it doesnt work very well. It seems that it doesnt get the mousedown, up, etc... just JOYAXISMOTION


Cheers,

Kjm





--
altern