Slower Mouse Movement

Started by edmundito, Wed 13/07/2005 22:14:21

Previous topic - Next topic

edmundito

Is there any way to make the mouse cursor move a lot slower? And also, make it constant, because when one moves the mouse a lot faster, ther cursor moves faster, too.

monkey0506

As far as I know there is no way to do this.  There's no mouse.speed variable or anything like that.  You may be able to work something out with repeatedly changing the mouse bounds or something, but I don't know.

Pod

Changing the game speed effects mouse speed.
As for pointer acceleration: that might be a windows setting.

Wersus

'ello!

Is there any new solutions to this? Changing game speed only makes my cursor movement look bumpy. Is there anything available that would have the same effect as slowing down the cursor from setup of windows? Wouldn't want to bother the player with changing some options to make the game playable...

DoorKnobHandle

Every frame store the current mouse position in two global integer variables (call them old_mouse_x and old_mouse_y for example). Then also every frame subtract the current position of the mouse (mouse.x, mouse.y) from those old values from last frame. This will get you the vector (2d) that the mouse has traveled in between both frames. Half the length (for example) of that vector and position the mouse there.

Any flaw in that logic? Haven't tried it.

TerranRich

Quote from: dkh on Sun 12/07/2009 17:55:09
Every frame store the current mouse position in two global integer variables (call them old_mouse_x and old_mouse_y for example). Then also every frame subtract the current position of the mouse (mouse.x, mouse.y) from those old values from last frame. This will get you the vector (2d) that the mouse has traveled in between both frames. Half the length (for example) of that vector and position the mouse there.

Any flaw in that logic? Haven't tried it.

If you moved the mouse cursor slowly enough (one pixel per cycle) it wouldn't move it all... unless, of course, you rounded up... in which case it would only work if you moved the mouse fast enough, which I suppose is the desired effect.
Status: Trying to come up with some ideas...

Khris

One could use an overlay and display it at mouse coords times 0.7 or similar.
Then translate the coordinates whenever needed (e.g. in on_mouse_click).

Pumaman

It might be possible to add a script command to allow you to control the cursor speed, if this is something people would find useful?

Wersus

Quote from: dkh on Sun 12/07/2009 17:55:09
Any flaw in that logic? Haven't tried it.
I played around with that idea and at least I couldn't figure out a way to avoid side effects (like the mentioned 1 pixel movement). There was always something a bit screwed.


Quote from: Pumaman on Sun 12/07/2009 21:25:16
It might be possible to add a script command to allow you to control the cursor speed, if this is something people would find useful?
At least I would like that very much.

TerranRich

I can see how cursor movement would be too fast in low-res games. I second the notion in support of its usefulness.
Status: Trying to come up with some ideas...

Dualnames

A mouse sensitivity thing we can put on a slider will really be ideal.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Mr Flibble

I was interested in something like this as well, slower cursor movement makes the game feel more "solid" for want of a better word.
Ah! There is no emoticon for what I'm feeling!

subspark

Me too! I also vote for this option.

Cheers,
Sparky.

Charity

Not something I've looked for explicitly, but I have noticed some of my mice move far too quickly with AGS games.  I would probably put a mouse speed slider in my own if the option was there.

Semi-related note.  I've tried using a pen tablet with AGS games, but it is impossibly sensitive, so that the cursor jumps across the screen at the slightest movement, or else gets stuck in the corner.  I think this has something to do with the lower resolution using only a small region of the tablet, but I'm not sure.  Is this standard behavior and would it be affected at all by a slower cursor speed?

Snake

Sorry for the bump:

Yes, this is something I would be interested in a well. I had actually thought of this like last week, I think, and thought that there MUST be a command for it. I never looked, but yes, I would like to see this implemented as well, Chris.
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

GarageGothic

Sorry to bump this, but I couldn't find any newer topic on the matter and saw nothing related when searching through the latest changes.txt file.

I've been scripting some in-game drawing tools for AGS, and today I though I'd try them out with my Wacom Bamboo tablet. But, to my great disappointment I had the same results as Lyaer:

Quoteit is impossibly sensitive, so that the cursor jumps across the screen at the slightest movement, or else gets stuck in the corner.  I think this has something to do with the lower resolution using only a small region of the tablet, but I'm not sure.

I'd really love for something to be done about this, or even if someone could suggest a workaround. As far as I can tell in lo-res games you're limited to a 320x240 area (out of - in my case - a 1680x1050 native resolution) even when using the Direct3D scaling filters, so accurate clicking it's pretty much impossible - I had trouble just keeping the cursor inside the screen area. A shame really considering what brilliant input devices tablets are for point-n-click games.

Pumaman

Strange, with a mouse DirectX seems to automatically scale the co-ordinates to the screen resolution, but this doens't happen with a tablet. This is pretty hard for me to diagnose as I don't have a tablet, so I'm not sure what might be causing it. Are there any Control Panel settings for the tablet that might let you adjust this behaviour?

Charity

I haven't personally been able to find any setting like that.  I might look again later, but both the control panel and the set-up thing that comes with the tablet seem to focus pretty much on the more superficial behavior.  What constitutes a click, whether to map the tablet to the screen or use it relative to current position, et cetera.

It may be worth noting that when I use the mouse that comes with my tablet, I have no problems.  It's just the pen (or rather when one of them is mapped to the absolute screen position) that I get this behavior.

GarageGothic

#18
Thanks for the reply, CJ. Sorry it took me a while to respond, but apparently you cannot access the tablet control panel without actually having the tablet connected, so I had to wait till I could test it.

It's possible to map the tablet area to a portion of the screen (on the bamboo control panel it's Pen->[subsection: Tracking->Pen Mode]->Details->[subsection: Screen Area->] Portion), but I can't get it to work with any AGS games in full-screen. The cursor just disappears until I use the mouse and it vanishes again if I resume with the pen  :-\. Possibly this is due to the mapped area still being in native coordinates and thus off-screen in the game.

Unrelated, but another bit of weirdness I discovered with AGS and Windows cursors, is that if you use SetMousePosition from rep_exec_always (I used it for a mouse-look script and centered the cursor mosition every loop) and then Alt-Tab to Windows, you won't be able to move the cursor in Windows.

Edit: Got the cursor visible (of course you had to map the upper left corner of the screen instead of the center of the screen, makes total sense in retrospect), but despite this the cursor tracking is still all wonky and overly sensitive. So no workaround there unfortunately.

Codex

This doesn't help the convo at hand, but I find it interesting:
I use a high-end gaming mouse with extreme DPI and other finely-tuned pointer controls.  I only use the mouse really because I like its ergonomics and amount of buttons.

Unfortunately, it gets totally messed up while running AGS games!  My current game is 640x480 and the mouse stutters and hangs, especially when hovering over GUI elements.  I've wondering if there's any work around, not really for my sake, but for when I release the game.  Then I thought about how many different brand of USB mice there are, how many different drivers there must be and realized there's probably no workaround... unless of course there's a way in AGS to somehow force mouse speed?

SMF spam blocked by CleanTalk