News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Scroll issues

Started by jamespetts, February 21, 2022, 03:05:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have noticed issues scrolling the map this week when using a Linux client. I had last used the Linux client in early January and had noticed no such issues. The issues were present before the merges of the new features this most recent week-end. The issue consists of the map (or minimap) skipping and moving by an excessive amount when scrolling by clicking and dragging the mouse, such that what would normally be smooth scrolling instead ends up moving the viewport suddenly a long way from the origin point, which is disorienting and makes scrolling very difficult. The same behaviour occurs both on the minimap and the main game window, and whether or not "scroll inverse" is selected.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Do you think that is the influence of the merge from standard?
I don't think I've made any changes that affect the behavior of the main view scroll. I think it's a related change for Android.

jamespetts

Quote from: Ranran on February 21, 2022, 05:20:29 PM
Do you think that is the influence of the merge from standard?
I don't think I've made any changes that affect the behavior of the main view scroll. I think it's a related change for Android.

I do not know the code in this area well enough to comment - it is certainly possible that it is related to the merge from Standard.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

I also noticed these issues when I came back from hiatus a few weeks ago.

But I have now observed that I only get them on recent Bridgewater-Brunel 4 savegames, not when I make new and smaller maps or when I load the B-B4 saves from 1750. So I suspect that they are to do with the complexity of the B-B save.

Also, I updated my firmware's firmware at Christmas, which meant that my RAM was reset to its JEDEC speed (2666). When I remembered to turn on XMP and increase the speed to 3200 last week, the scrolling issues lessened, especially when I ran the map offline. I don't know how to measure scrolling lag objectively, but I hadn't expected this to happen, so it wasn't exactly confirmation bias. Unfortunately, the lag feels noticeably worse again after only a week.

BTW this experience suggests that Extended is bottlenecked by RAM bandwidth. You could say that's good news. It's not bottlenecked by CPU because James has put so much effort into multithreading; I would guess that Extended has by far the best multithreading of any game from the 1990s. ;D And it's not bottlenecked by RAM size because of the great work that Freddy did, halving the game's memory usage. It's a nice problem to have. 8) Thank you, James and Freddy!

I hope that memory bandwidth usage could be improved by thinking harder about data layout and using the cache better by aligning data to cache lines. But maybe it's already been done. Or maybe it's just waiting for someone to volunteer to do it. :::) It's a bit beyond my level right now. But perhaps it's something that should be considered more carefully when deciding whether to accept new patches.

In the particular case of B-B, it will be interesting to see whether the lag is reduced when MIdland & Zookian Charity Transport disappears in about 15 game years' time. They have 2,511 convoys, or almost exactly a third of the total on the map, so that would confirm that the lag is due to the complexity of player networks.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

I do not think that the scroll issue is fundamentally a performance problem, although it is probably exacerbated by computational load. This is because this issue only occurred after a recent update and did not occur in the past when computational load was equally high.

However, I should note that a game like this will always be limited by memory bandwidth more than anything else.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Do any of you who were on the BB server remember when this started?

prissi

The scrolling was changed to allow for finger use. Using the current simsys_s2.cc, simsys_w.cc, symsys.h,  and siminteraction.cc should fix this.

PJMack

#7
This is probably a red herring, but this just started for me with the last merge of the pier system branch.  The weird is, I only merged the pakset thus far.  There has been discussion of a desync and a possible relationship to new translation texts, so I am wondering if a specific piece of new text is triggering an old bug.

Edit: This is also rather intermittent.
  Nevermind, this was operator error.

Junna

Since a couple of weeks update (although prior to that, I had not updated for a couple of months, so it probably dates from around this time), using the mouse to scroll around constantly sees the mouse pointer move too fast compared to the game, so that the mouse pointer moves outside of the game window (i.e., it stops moving the view and instead ends up on toolbar, or on the edge of the game) when holding right click. I tried to modify DPI settings and see if it would fix it, but it remains an issue.

prissi

IN display settings, there should be infinite mouse movements, which should more or less restore the old behaviour (unless extended did not port this setting yet.)

Junna

Ah, that explains it, I think the option hasn't been ported yet.

jamespetts

I have now incorporated the latest merge work undertaken by Ranran, which appears to address this, although it does not seem to have the "infinite scroll" option. Please do test with to-morrow's nightly version and let me know whether there has been any improvement. Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Junna

The fixes does not seem to address the issue, and it remains unchanged. I suppose Ranran may port it eventually. w

jamespetts

Quote from: Junna on May 16, 2022, 08:16:57 AMThe fixes does not seem to address the issue, and it remains unchanged. I suppose Ranran may port it eventually. w
I am wondering whether pull request no. 530 fixes this - but I am awaiting clarity from Ranran as to whether this was intended to be cumulative with the pull request that I did merge to which I referred above.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

I have already replied to the PR530 thread on github a few days ago that those branches are not related.

jamespetts

Quote from: Ranran on May 22, 2022, 04:57:09 PMI have already replied to the PR530 thread on github a few days ago that those branches are not related.
Ahh, thank you; my apologies, I must have missed that. I shall have to test this when I have finished re-testing the pedestrians issue.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

Looking at this now, there seems to be a merge error with simversion.h - this should be straightforward to solve in principle, but is likely to be much easier for you to do it than I since you will have a clear idea of what you intended with the version numbering code.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

I think the conflict has been resolved.

jamespetts

Quote from: Ranran on May 22, 2022, 11:52:12 PMI think the conflict has been resolved.
Thank you for that. Unfortunately, I seem to be getting a compile error with respect to an undefined legend_entry_t when I compile this. I have pushed this onto my std-r10415 branch. I am not sure why this compile error occurs, but I should be grateful if you could look into this. Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Quote from: jamespetts on May 23, 2022, 12:04:24 AMI seem to be getting a compile error with respect to an undefined legend_entry_t when I compile this.
I think I fixed it. I would appreciate it if you could check it again.

jamespetts

Quote from: Ranran on May 23, 2022, 10:57:06 AMI think I fixed it. I would appreciate it if you could check it again.
Thank you for that. I have now merged this and this does indeed compile, but I now get an error reading the settings_extended.xml file, indicating that this version is incompatible with the configuration files (and possibly saved games) of the current master branch. Although this error is not uncommon and not a sign of anything wrong when loading a configuration file from an as yet unmerged branch in the master branch or another unmerged branch, this should not happen when loading the configuration file from the master branch, and indicates that there is a versioning error somewhere.

I should thus be grateful if you could look into this. Thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran

Quote from: jamespetts on May 23, 2022, 08:45:01 PMthat there is a versioning error somewhere.
Thank you for noticing it. I think now I have fixed it.

jamespetts

Excellent, thank you. I have now incorporated this, having further re-numbered the version to take account of a recent change in the latest master.

Thank you very much for your work on this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

When I started the client with today's Nightly build, I found the scrolling problem was much worse. THe scrolling was too fast.

When I unselected "Infinite mouse scrolling", then scrolling was too slow.

Then I increased scroll speed (from 2 to 4). Now the scrolling is just right.

Thank you to the Standard devs, Ranran, and James for the work on this.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。