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

Re: [pygame] Pygame, cwiid and ode - movement





On Thu, Aug 7, 2008 at 2:12 PM, Nathan Whitehead <nwhitehe@xxxxxxxxx> wrote:
Hey nathan, good to see you still talkin' about the Wii Remote :)
Are you using pywiiuse for the data input, or some other library?


To fix the jerkiness, a first step is averaging several values over
time.  A better but harder approach is a Kalman filter.

Speaking of Kalman filters, is there an already-implemented filter in Python that can be used, or
does everybody roll their own?  If there isn't, maybe that's something to work on (not that I know a lot about kalman filters,
but I wouldn't mind starting a project.)  I'm at work so I can't do extensive research into it right now.


To fix the flickery problem: if there are 0 dots reported, use the
most recent positions.  That stops the input from disappearing for a
frame.  If there are too many dots (3 or more), then you want to pick
the 2 dots closest to the last reported IR positions.

To fix the edge-of-the-screen problem, a good approach I've used is to
guess where the missing IR dot should be.  I assume that the dot off
the edge of the screen moves just like the one that remains on the
screen.  This won't be strictly true if the wiimote is rotating or
changing distance to the sensor bar, but it will keep the paddle
responding to input rather than stopping abruptly at the edge of the
screen.
Sounds like good advice.


FYI: I'm working on a pygame library that supports the wiimote on all
platforms, it will be done Real Soon Now.

Awesome!  I think that we talked about this before, but I'm not sure.
Are you going to make the event engine sufficiently robust so that it can support Pyglet with little changes?
Do you have source available?  I'd love to take a look at what you're doing!
Thanks,
-Luke