News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Free road utopia created on map generation

Started by Roboron, April 04, 2026, 07:06:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Roboron

On map generation, a small neighborhood was created on one corner of the map, far away from any city hall. Even stranger: there is no roads! How are they supposed to move around without cars??? Insane!

4c08450066a6430b.png

If you join the Simutrans Public Server, you can see this for yourself. I have tried to recreate the map and the same happened again and again (with different buildings).

Isaac Eiland-Hall

On reddit, there is a subreddit called /r/f***cars (I censored the word, but it's the "f" word in the name) that would probably love this. lol

Nazalassa

I checked the buildings and they each belong to a different city. As such, some cities have their area going from (0,0) to (x2,y2) instead of (x1,y1) to (x2,y2). (As a side effect, what happens when such a city decides to build houses? Are they spread up over the map?)
Making paks since October 2023  |  pak48.bitlit | pak32.box | MLM for pak64 | Empire F7 cars | Pneumatic tubes | More pak64 vehicles and industries

Life is like a multi-tasking OS: you know you'll eventually get back to everything, but you don't know when.

Andarix

This problem has existed for quite some time in the server game.

Sorry, I can't find the thread about it anymore.

[EDIT]

https://forum.simutrans.com/index.php/topic,23477.0.html

prissi

The houses would be spread over the map, although in principle limited to a suitable location (near a road or next to a hosue).

Isaac Eiland-Hall

Ah, geez, the way I play is with -freeplay on with a goal of serving every house/factory/etc. This would be an *adventure* of a map. lol. Little busses all over! :)

prissi

I have created quite a few maps an never got this so far. Are there any addons, like multitile buildings in your pak128?

Roboron

No addons, vanilla pak128.

You can check the Simutrans Public Server map, and if you create a map with the same parameters it should happen again (it happened to me every time).

prissi

I created 25 maps and it did not happen even once. Sorry, cannot reproduce this.

cousjath

I have had this happen before with pak192.comic. It seems to occur at certain densities of cities on map generation, but it has been a while since I was having the issue. Also therr has been the occasional very long or very wide city.

victor_18993

I have now reproduced the malformed city-area state on a real affected multiplayer save.

The city bounds themselves are not the source of the problem. They are being calculated correctly from the buildings owned by each city.

The actual issue is that some normal residential/industrial city buildings exist hundreds of tiles away from their owning city. When those remote buildings are included in the city's building list, the city area expands correctly to include them.
I also confirmed that this is not caused by stale bounds or by save/load corruption: the malformed area is reconstructed from the city-owned buildings after loading.

So the bug is now narrowed down to the creation of the first remote city-owned building.

I have not patched anything yet because the code path that creates that building is still unknown. The next step is to compare later snapshots of the same affected server and catch the first new remote building when it appears.
Status: confirmed and narrowed down, creation path still under investigation.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)

prissi

Well, then it is probably to saving the tile offset instead the actual coordinates, or coordinates getting overwritten during the game. On nearly all map (with slopes at the corners, a house should have never an x or y of zero. So we are looking for house constrution or renovation path without updating the coord.
r12261 with throw and assert for debug builds of x==0 or y==0 or distance to center larger than 250.

victor_18993

En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)