Hi all, I've created a first step toward Wii Remote support in Pygame. Patch is against 0.7.1 because the current SVN doesn't build for me. I expect that future patches will be against SVN head, or 0.8 when that is released. Let me know what you think. You can download the current sample code here:
http://gs3080.sp.cs.cmu.edu/wiimote/ Here's the README file: Preliminary Wii Remote support for Pygame. This is definitely proof-of-concept code, and is only likely to work in Linux. The only supported features are: discovering Wiimotes via Bluetooth, polling the buttons and 3-axis force vector, and setting the LEDs. The wiimote.py module has useful docstrings for all public functions, so "pydoc pygame.wiimote" should give you some helpful documentation once it's installed. You can also just look at the LiiPong sample code. Files in this package: liipong-0.1.py Pong for Linux with the Wii Remote. See the top of liipong-0.1.py for some setup instructions. You can play 1-player or 2-player! To play 2-player, just sync 2 Wii Remotes when the game prompts you to. pygame-0.7.1-wiimote1.patch Patch to Pygame 0.7.1 that enables preliminary Wii Remote support. I'll generate a new patch against Pygame 0.8 when that comes out (for now, the SVN isn't building for me; I seem to need a new version of SDL, which I'm too lazy to compile from scratch at the moment). __init__.py, locals.py, wiimote.py Full versions of the Pygame 0.7.1 files I changed to enable Wiimote support. If you don't want to use the patch program, you can just drop these in to the lib/ directory of the Pygame-0.7.1 source distribution. robomancer