Problems panning map with mouse right button

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Problems panning map with mouse right button

Post by lewisd »

Long time player (though not for a while) with a problem I've never seen before.

When I try to panning the map by holding the right mouse button and moving around, it's... weird.

Some clicks, it pans any direction fine. Some clicks, moving them (physical) mouse up or left scrolls fine, but moving it down or left, the map hardly moves. I can't seem to find any pattern to when it works, and when it doesn't. Scrolling with the arrow keys works fine. It's bad enough that it's unplayable. Happens in both fullscreen, and windowed.

I've searched the forums and checked the FAQ, but couldn't find anything.

I've found this on ottd 1.6.1 and 1.7.1, on Windows 10 64 bit.
(Pretty sure my system is plenty fast enough. 32 gigs of ram, Quad Core 3.5GHZ Processor, GeForce GTX 980 Ti)
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Problems panning map with mouse right button

Post by Alberth »

System specs mean very little, OpenTTD mostly runs at a single core, and doesn't use the GPU at all.

The best way to test cpu load is to either check how much of a single core is being used by OpenTTD (but todays ways of displaying CPU usage makes that difficult), or by pressing the fast-forward button, and see if the game actually speeds up.

Did you try closing down other applications that are running?
Being a retired OpenTTD developer does not mean I know what I am doing.
_dp_
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 18 Dec 2013 12:32

Re: Problems panning map with mouse right button

Post by _dp_ »

Had same weird panning behavior recently. Turned out my mouse was dying :roll:
lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Re: Problems panning map with mouse right button

Post by lewisd »

Alberth wrote:System specs mean very little, OpenTTD mostly runs at a single core, and doesn't use the GPU at all.

The best way to test cpu load is to either check how much of a single core is being used by OpenTTD (but todays ways of displaying CPU usage makes that difficult), or by pressing the fast-forward button, and see if the game actually speeds up.

Did you try closing down other applications that are running?
I didn't try closing things (but I'm sitting at about 7% CPU use when I'm not doing anything, and OTTD isn't open.) When I scroll around in OTTD (with the game paused) Windows shows that process using 0% CPU still, lol. I haven't even really unpaused the game to try playing it, since the scrolling is so bad I can't play. Besides, I've played OTTD on this PC before (just not in a couple years) and it ran smooth as butter. As would be expected from the CPU.

I've tried it with two different mice on the same PC, and get the same problem. I've tried it with those same two mice on my laptop, and I have the same problem there. I copied my game directory from the PC to the laptop, and loaded the same save. I have no newGRFs active.

I'm really stumped what could be causing this.
lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Re: Problems panning map with mouse right button

Post by lewisd »

Whoooaah! Get this!

If I turn on "left click scrolling" and use the left mouse button, it scrolls fine. But if I use the right mouse button, I have the problem I described at the beginning of this topic. Why would those scroll differently? Does that make any sense to someone who knows the code?

Is anyone able to reproduce this problem? I can provide whatever files would be useful. I've had it with my old saves as well as brand new games, so it's something other than the save itself.

EDIT: Hmm, the problem also occurs when scrolling the map window. I can't use left-click scroll there, so I'm having the same problem where right-click scroll works fine one direction, but it slow and choppy in the other direction.
User avatar
TimeLapse1357
Traffic Manager
Traffic Manager
Posts: 132
Joined: 10 Mar 2015 07:13
Location: Southern California

Re: Problems panning map with mouse right button

Post by TimeLapse1357 »

Try cleaning/replacing your mouse. Even optical mice can get dust and lint inside them, blow some canned air in the gaps around the buttons/scroll wheel.
lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Re: Problems panning map with mouse right button

Post by lewisd »

The mouse is not the problem. I've tried two different mice. Both work fine with everything else.
3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: Problems panning map with mouse right button

Post by 3298 »

We've had a few similar reports - knowing an appropriate search term I could locate these three threads. The common denominator is a Windows bugfeature called "mouse gestures" which you'll need to turn off. - By the way, and would you please report back if it worked? The first of the linked threads ended on "Thanks, will try." I assume it worked because no complaint followed, but a definitive answer to link back to (for similar complaints in the future) would be great. :)
Disclaimer: I don't have a Windows version with that bugfeature myself (it's actually one of several reasons to keep the old version I have), so I don't know how to turn them off - though that should be easy enough to find out using Google or similar tools. I'm just reading this forum and trying to be helpful by using my memory of old threads.
jioksa
Engineer
Engineer
Posts: 2
Joined: 21 Sep 2017 13:30
Location: Czech Republic

Re: Problems panning map with mouse right button

Post by jioksa »

I am encountering this problem as well on my Windows 10 Insider Preview 64-bit desktop. For clarity, enabling left-click scrolling worked well. Seemingly every website explains how to disable touchpad gestures (and the steps vary for each touchpad vendor), which is a bit hard with no touchpad in the first place :P

The strange thing is that I played OpenTTD on this very desktop a few months ago (1.6.1) and this problem didn't happen at all, now it does even on 1.6.1. IIRC the issue started appearing after I reinstalled Windows 10 in spring - the old Windows install dated back to the original July 2015 release, perhaps some default settings changed with the subsequent feature updates? Gonna try with a VM.
lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Re: Problems panning map with mouse right button

Post by lewisd »

Hello! I think I was able to fix it, thanks to your help.

I was unable to find anything about mouse gestures (I think it may only be a think on laptops, with touchpads? This is a desktop) but while looking through the Windows mouse settings, I did find this: "enhance pointer precision"
It's on by default. When I turned it off, my scrolling problem in OTTD went away!

I found this useful post about what the feature is, so you know what you're disabling: https://www.howtogeek.com/321763/what-i ... n-windows/
With my Logitech G5 mouse, I hardly noticed any difference when I turned it off. (Except that scrolling in OTTD works, lol) It could be that when I've played before, I had Logitech mouse software installed. It looks like I don't have that any more, so maybe that made a difference.
lewisd
Engineer
Engineer
Posts: 13
Joined: 09 Jan 2008 05:11

Re: Problems panning map with mouse right button

Post by lewisd »

Hmm, I spoke too soon. It does feel a bit different with that disabled. I kind of like having mouse acceleration, I always have.

I installed Logictech Setpoint to try to use their mouse acceleration, but as soon as I turn it on, the OTTD scrolling problem is back. I really do think this is a bug in OTTD. I've never had these problems in all the other years of playing, and I definitely used to have Setpoint installed, and have mouse acceleration turned on.

EDIT: The problem happens in 1.5.2 as well (happened to still have that version kicking around) so maybe it's something that Windows 10 changed that's conflicting with the way something's done in OTTD. :(

EDIT: The previous fix of turning off mouse acceleration (ie. "enhance pointer precision") also doesn't seem to entirely fix it. Scrolling is still inconsistent. Sometimes it scrolls pretty fast, sometimes it hardly moves. But it doesn't seem to be dependent on the direction I'm scrolling, at least.
eshield
Engineer
Engineer
Posts: 32
Joined: 24 Feb 2009 12:41
Contact:

Re: Problems panning map with mouse right button

Post by eshield »

This issue occurs on upcoming Windows 10 Redstone 3 update and does NOT occur on previous Windows updates. This should be fixed in OTTD. I suppose OTTD is using some outdated routines to process mouse messages. It's sad I can't play my fav game of the life anymore :(
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
3298
Traffic Manager
Traffic Manager
Posts: 143
Joined: 02 Apr 2011 12:55

Re: Problems panning map with mouse right button

Post by 3298 »

If it does not occur in previous versions of Windows, it's pretty obvious that it's a Windows bug. :roll:
I doubt that anyone is keen on working around new Windows issues everytime Microsoft releases an update. A demand like "This should be fixed in OpenTTD" is unlikely to encourage the devs or contributors - it's more likely to achieve the opposite by making a post look ... (how do I politely say "childish"?) ... clueless and therefore safe to ignore. Just FYI - and this is my impression as a (admittedly minor) contributor.


@lewisd: sorry about the late reply, I didn't have a lot of useful ideas, like everyone else apparently. I don't want to suggest rolling back to a previous version (the newer version might have some stuff you want, and then there are those security fixes that people tend to ignore until it's too late) or using a virtual machine (probably not worth the hassle), soo ...

- have you tried messing with the settings in the compatibility tab of openttd.exe's properties? Admin privileges, 256 colors, or 640x480 resolution won't help, but perhaps something else will. The second one of the threads I linked in my previous post mentioned disabling DPI scaling which apparently helped for someone back then (must have been on Win8 though). I later suggested that in the third one, but it didn't help, so that appears to be an unreliable workaround.

- the other suggestion I have may be a bit undesirable - scroll the map another way. Arrow keys, cursor at screen edge, the scrollwheel (if you set it to scroll the map; could be useful on mice with horizontal scrolling abilites, e.g. a tiltable scrollwheel), or combining zoom (i.e. the other choice for the scrollwheel) with mouse movement (zoom out, move mouse, zoom in; OpenTTD tries to keep the same tile under the cursor while zooming, so you essentially zoom out to a kind of overview and zoom in on another spot). I see you have discovered left-click scrolling already, and your comment about its limitations is valid (though I think a patch to reduce these would be possible); finally there's a hotkey (default C, I believe) to re-center a viewport on the tile the mouse cursor points to.
I agree that it's not ideal, but I'm afraid I'm out of ideas.
The arrow keys are worth trying at least for this reason: They ought to be immune to most mouse problems the operating system can throw at OpenTTD, so if that's accelerating and braking erratically, then the reason may be insufficient bandwidth to push graphics changes to the graphics card (scrolling changes a lot of screen space per frame, after all). That may be sound paradox with today's powerful graphics cards, but they focus on 3D processing power, leaving the old 2D functions in a "who cares about performance, we only need it for historical reasons" state - except there's OpenTTD wanting to use them. :| Even assuming your hardware didn't change from the point at which it worked properly, the drivers may have changed, which can affect performance.
eshield
Engineer
Engineer
Posts: 32
Joined: 24 Feb 2009 12:41
Contact:

Re: Problems panning map with mouse right button

Post by eshield »

3298 wrote:A demand like "This should be fixed in OpenTTD" is unlikely to encourage the devs or contributors - it's more likely to achieve the opposite by making a post look ... (how do I politely say "childish"?) ... clueless and therefore safe to ignore. Just FYI - and this is my impression as a (admittedly minor) contributor.
That's because your default stance is declining :wink: Obviously, I've pointed out that this is not a Windows bug and it is in OpenTTD which is just surfaced, and that's all.

As a developer, I forced to be "in touch" with all pending OS releases because it will save me a good bunch of nerves after OS release. Why? Because my software is ready to face it. But, this is my way of thinking ... one is free to be agree with me or not.
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Problems panning map with mouse right button

Post by Alberth »

Except we don't deal with the mouse interface at OS level, a library does that. In other words, nothing needs to be done in OpenTTD, the library needs fixing at best.
Being a retired OpenTTD developer does not mean I know what I am doing.
Arveen
Engineer
Engineer
Posts: 3
Joined: 30 May 2015 07:27
Location: DE / FFM
Contact:

Re: Problems panning map with mouse right button

Post by Arveen »

I'm having this problem as well since i upgraded to Windows 10 1709 (Build 16299.19). Toggling the DPI awareness checkbox does not fix the problem like it did on older Windows 10 versions.
maartena
Route Supervisor
Route Supervisor
Posts: 470
Joined: 11 Jul 2003 04:53
Location: California, U.S.A.

Re: Problems panning map with mouse right button

Post by maartena »

I too have this problem.

A little history: I first encountered the problem when I became a member of the windows preview system, and downloaded a preview build. I couldn't find a way to fix it. Eventually, due to other problems with that particular build, I did a completely fresh reformat of my computer, and installed the "production" build of 1703, which worked fine.

Today, I upgraded to Windows 10 Creators Update 1709, the new Windows 10 version that was released this Monday. And the right-mouse problem with OpenTTD immediately returned. I am not noticing any right mouse issues in any of the other games I play. Obviously, something Microsoft changed now affects the way OpenTTD handles right mouse movement.

I can also confirm that enabling LEFT scrolling with the mouse has an immediate effect, left scrolling works seamlessly and without problem. Like a previous poster, I also have a Logitech mouse. Again however, no problems in any other games whatsoever with the right or left mouse, and also no problem with right mouse operations in editors and such.

Its obvious that the culprit here is Microsoft.... but unless the OpenTTD dev team has some magnificent powers to make the software giant bow to their will, it is more likely that OpenTDD will have to bow to Microsoft and adjust to it. However, like the developer above said.... this may be in a library, and the developers of the library may need to update it.

In any case, OpenTTD has become a bit unworkable for me..... after nearly a decade of right-mouse clicking, having to use left click now is a bit... odd. :D :D
Guess what! I got a fever! And the only prescription...... is MORE COWBELL!
RayLemon
Engineer
Engineer
Posts: 1
Joined: 18 Oct 2017 14:50

Re: Problems panning map with mouse right button

Post by RayLemon »

Hello !
I have the same problem with my mouse. But I also have the solution.
The problem isn't really OpenTTD or Windows. In fact, it's a "bug" of the Logitech mouse (especially gaming mouse) within new version of Windows…
It's due to DPI sensibility and polling rate. As workaround, simply put polling rate at the lowest value, and DPI to higher value.

Below a screen of my configuration. The panning is not perfect, but playable.
2017-10-18_17h06_12.png
2017-10-18_17h06_12.png (360.45 KiB) Viewed 1945 times
Sorry for my bad english !
kaaremai001
Engineer
Engineer
Posts: 2
Joined: 19 Oct 2017 21:24

Re: Problems panning map with mouse right button

Post by kaaremai001 »

RayLemon wrote:Hello !
The problem isn't really OpenTTD or Windows. In fact, it's a "bug" of the Logitech mouse (especially gaming mouse) within new version of Windows…
This is NOT true. I have tested it with three different mouse brands and it's all the same. As this is only a problem in OpenTTD i'm inclined to believe that the fault is within this game somewhere. It's super weird that the problem only presents itself when using right mouse button panning and not left mouse button panning :O

Let's hope that someone figures out how to fix it so i can play one of my favorite games again :D
Lighteye
Engineer
Engineer
Posts: 3
Joined: 19 Oct 2017 23:58

Re: Problems panning map with mouse right button

Post by Lighteye »

Same problem here. I've played openttd every day the last week without problems.

Since I installed Windows 10 Fall Creators Update yesterday the problem exists.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 3 guests