Re: mouse smoothing

Fabian Giesen <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
Tom Plunket wrote:
>>> Yeah, there is some non-trivial approach to doing this, and it's done by
>>> the OS. :-)
>>>
>>> In Windows, you can adjust parameters related to this. The most notable
>>> (in my opinion) is the acceleration slider which is a power function on
>>> the velocity.
>> That's not doing any smoothing either, though; quite the opposite, it
>> further exaggerates the input mouse motions.
> 
> I had guessed that it downward expanded slow movement, too, but I never
> really dug into it to see for sure.  There is the mouse speed slider, too,
> though, which scales the velocity linearly, which could "damp" the motion
> in a different way.

There's a small article explaining the mouse acceleration algorithm used 
in Windows XP:

   http://www.microsoft.com/whdc/archive/pointer-bal.mspx

It's hard to say for sure whether it's slowing down small motions since 
there's no "1:1 translation" reference curve in the graphs. However, the 
curves are piecewise linear with no huge slope differences; if there's 
any downward scaling done at some point, its effect would be quite mild.

> I wonder, though, if the input is noisy but is sufficiently filtered by
> the software path.  I mean some of these mice claim 1000dpi, I can't
> imagine they're not going to have some jitter at the hardware sampling
> level.

Not sure what happens at the mouse firmware level to get data this 
sparkly clean (well, unless you're on a surface it can't track properly 
on...) :). But you can get the raw delta mickeys from the raw input API 
on Windows (or DirectInput too for that matter) and just by directly 
opening the USB device on Linux. Aside from the obvious lack of mouse 
acceleration (which may be what you want in your game!), the values are 
just as noiseless as the mouse pointer coordinates.

-Fabian

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.