On Feb 1, 2008 4:10 PM, Simon Wittber <[EMAIL PROTECTED]> wrote:
>
> I've written a Joystick class which works in a pygletty manner.
>
> http://entitycrisis.blogspot.com/2008/02/pyglet-joystick.html
>
> Anyone feel like implementing equivalent OSX or Win32 classes?
>
> I'm open to suggestions for improvement. I think the device file
> handling could be better, and I'm not sure of the best approach to
> implementing a cross platform class which depends so heavily on OS
> internals...

Very nice.  The only obvious missing part is publication of the
joystick's capabilities (how many buttons; what the axes are aligned
to; which buttons are directional...).  I'd also normalise the axis
values to [-1, 1], but that's just me.

The built-in event loop in pyglet 1.1 uses select() on linux, so
integration with that won't be a problem once the API for registering
file descriptors is in.

A Windows equivalent class shouldn't be much trouble -- use
DirectInput with the pyglet.com interface (see the directsound media
driver for an example).

OS X joystick support seems to be a lot more involved, based on the
little documentation I've skimmed.

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to