Re: [Algorithms] mouse smoothing
Brought to you by:
vexxed72
|
From: Jason H. <jh...@st...> - 2009-09-12 08:04:21
|
Although you are asking about mouse smoothing in a FPS-style game, a similar but opposite problem exists when dealing with light guns or the cursor on the Wii using the DPD pointer: preventing jitter and restricting movement when not enough change has occurred. After doing some experiments with a recent title I worked on, which involved quite a bit of point-and-clickery, it turns out that the simplest method was to accumulate virtual 'mickeys' of change, but do not actually begin moving the mouse cursor on-screen until a threshold was reached. Once the cursor was unlocked, it did not settle down until the average velocity reduced below some threshold. Smoothing the transitions between the two states (locked/unlocked) was simply done by the cheap unstable spring method, where each frame we took (x,y) = a*currentPos + (1-a)*newPos, and "a" ramped over a very short time down to 0. During the locked state, it always chose the current position to be the centroid of several previous samples. The above gave us a nice slow moving cursor that didn't stick in one place and didn't jitter as long as the aim didn't deviate too much, too quickly. And it (fairly) immediately launched into motion if the aim changed drastically, but the cursor caught up smoothly. Not great for a FPS, but for a mechanical device with bulk and inertia to overcome, it might make sense to try something similar. JH Jeff Russell wrote: > Okay, seems we have a consensus :-P No filtering: > > x += dx; > > Just curious if there was some non-trivial approach that i didn't know > about that was maybe good for this. TBH I've never quite understood > the importance either, but some of our users are asking for it. > > Cheers, > > Jeff > > On Fri, Sep 11, 2009 at 8:58 PM, Sylvain Vignaud <vi...@ii... > <mailto:vi...@ii...>> wrote: > > I've never seen a game where it helped/where I felt I played > better with > it. Whether I had crappy or good mouse. > > Nicholas "Indy" Ray wrote: > > I agree that mouse smoothing in a FPS is not a good default! > I've had > > better experience with a few third persons games, but I figure only > > then if aiming isn't important. > > > > Indy > > > > On Fri, Sep 11, 2009 at 1:11 PM, Oscar Forth > > <os...@tr... > <mailto:os...@tr...> > > <mailto:os...@tr... > <mailto:os...@tr...>>> wrote: > > > > TBH any form of enforced filtering just annoys me. I FAR prefer > > no filtering, my experience is that most PC gamers agree. So > > whatever you do for filtering ... make sure it can be turned > off! > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > 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 > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list -- Jason Hughes President Steel Penny Games, Inc. Austin, TX |