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

RE: [pygame] Speed of mouse position capture



 

> -----Original Message-----
> From: owner-pygame-users@xxxxxxxx 
> [mailto:owner-pygame-users@xxxxxxxx] On Behalf Of Bob Ippolito
> Sent: Tuesday, 16 May 2006 12:21 a.m.
> To: pygame-users@xxxxxxxx
> Subject: Re: [pygame] Speed of mouse position capture
> 
> 
> On May 15, 2006, at 7:29 AM, Luke Paireepinart wrote:
> 
> > [snip]
> >> [embarrassed] I don't know how to multi thread. Will try using 
> >> DirectX, failing that will investigate multi threading 
> (can you point 
> >> me to a good reference?)
> >>
> > I don't know how to use threads very well either.
> 
> That's not a problem, because threads will most definitely 
> not solve this problem anyway. Mouse positions are only going 
> to get updated when the event queue is pumped, and besides 
> that you'd lose *more* mouse information by calling get_pos 
> than by inspecting each individual event since it just 
> returns the last mouse position that SDL knows about, rather 
> than each individual event.
> 
> In this case, there's nothing you can do except interpolate 
> -- Windows is coalescing some of those events (and I would 
> expect other platforms to do the same). Using a bezier curve 
> to interpolate between mouse positions usually produces 
> something reasonable looking.
> 
> -bob

Hi, thanks for the advice, can you point me towards some code for bezier
interpolation?

Brian
"The information contained in this transmission is confidential. It is intended for the named address only. If you are not the named address you may not copy, distribute or take any action in reliance upon this transmission"