The International Simutrans Forum

 

Author Topic: [11.14] On creation of new map with certain settings, industries...  (Read 2860 times)

0 Members and 1 Guest are viewing this topic.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Moderator note: Moved from the Experimental development forum as this issue has been confirmed in Standard.

There seems to be something amiss with industry distribution with certain settings.

https://dl.dropboxusercontent.com/u/17111233/test11.14.sve

It is as if the game places the industries normally, then runs out of room and squashes the remainder into the top and left edges of the map.
« Last Edit: January 12, 2014, 08:50:57 PM by jamespetts »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #1 on: January 12, 2014, 06:44:22 PM »
Hmm, interesting. In what range of conditions have you seen this so far?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #2 on: January 12, 2014, 08:08:59 PM »
From some testing, anything higher than 150 industries on that map will result in a significant amount of industries being squashed into the edges.

with 100 it is mostly okay, but some chain industries will bunch up.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #3 on: January 12, 2014, 08:15:28 PM »
Hmm. I wonder whether this is unique to Experimental or also an issue on Standard?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #4 on: January 12, 2014, 08:26:57 PM »
currently testing it on standard r7007 (it takes a while to generate large maps)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #5 on: January 12, 2014, 08:31:47 PM »
Thank you!

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #6 on: January 12, 2014, 08:44:12 PM »
It seems to sort of do the same thing, but not entirely under standard.

One thing I tested was square vs. extremely wide maps
Mostly square maps do not exhibit the problem, or at least, it is harder to notice.

Extremely wide maps, like 8064x1664, with 600 industries somewhat has this problem under standard, where industries will bunch up at the top and left edge, although not to the same extent as experimental.

So there seems to be a bug from standard that is somehow compounded in experimental.

---
edit
I tried a 1664x1664 map with 600 industries and 600 cities and it will give the industries bunching at top and left edge, but it is definitely not in the same league as what experimental gives.
« Last Edit: January 12, 2014, 08:50:31 PM by ӔO »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #7 on: January 12, 2014, 08:49:29 PM »
Hmm - in that case, it seems to me as though this is an issue that needs to be fixed in Standard for the fix to be incorporated into Experimental (it may well be that pakset settings compound the issue rather than Experimental per se).

I am moving this thread to the bug reports forum for Standard so that it can be looked into there. Thank you for the report and for testing - that is most helpful.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9569
  • Languages: De,EN,JP
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #8 on: January 12, 2014, 09:29:58 PM »
There was the same issue reported in the german forum. It just seems that in all cases certain climates and industries caused this. On perfectly flat maps I did not observe it. When observed, it was once in five games, but then sometimes at the top, at the left or at the bottom. I created maps for two evening and did not find any reliable re-occuring pattern. Hence I concluded that this was rather random and only the eye tended to group those together.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #9 on: January 12, 2014, 09:31:09 PM »
It seems that this is a real thing, probably exaggerated by some of the settings in Pak128.Britain-Ex.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9569
  • Languages: De,EN,JP
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #10 on: January 13, 2014, 12:33:09 PM »
Ok, I found some issues on deeper search:

fabrikbauer_t::finde_zufallsbauplatz iterates first over all y and stops on first success. Now I just step with a pseudo random function, which should generate a more random repeat of locations. Maybe such a function is also a better way to look for a factory place in the first end ...

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4603
  • Languages: EN, DE, AT
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #11 on: January 13, 2014, 01:20:41 PM »
Thanks for looking into this. I think this routine is broken, it does produce way too large x offsets. A protection against overflow needs to be added:
Code: [Select]
index %= size;
However, I do not see how this could contribute to the perceived wrong distribution at the left boundary of the map. (It does not first iteraterate over y and then over x....)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9569
  • Languages: De,EN,JP
Re: [11.14] On creation of new map with certain settings, industries...
« Reply #12 on: January 13, 2014, 02:57:25 PM »
The procedure iterated first over all y before trying the next x. Hence chances for factories at lower x were much higher than with the pseudo-random approach.

But you are right, some cleanup is in order. I hope the next version in r 7020 is more to you liking.