News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[11.14] On creation of new map with certain settings, industries...

Started by ӔO, January 12, 2014, 05:27:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ӔO

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.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Hmm, interesting. In what range of conditions have you seen this so far?
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.

ӔO

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.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Hmm. I wonder whether this is unique to Experimental or also an issue on 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.

ӔO

currently testing it on standard r7007 (it takes a while to generate large maps)
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

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.

ӔO

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.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

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.
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.

prissi

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.

jamespetts

It seems that this is a real thing, probably exaggerated by some of the settings in Pak128.Britain-Ex.
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.

prissi

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 ...

Dwachs

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:

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....)
Parsley, sage, rosemary, and maggikraut.

prissi

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.