The International Simutrans Forum

Simutrans Extended => Simutrans Extended Development => Topic started by: Dutchman on Rails on February 01, 2018, 08:17:22 PM

Title: Internal disagreement on town location.
Post by: Dutchman on Rails on February 01, 2018, 08:17:22 PM
This is an interesting savegame https://simutrans-germany.com/files/upload/DoR_Ambstockshire_1771-03.sve (https://simutrans-germany.com/files/upload/DoR_Ambstockshire_1771-03.sve). The point of attention is the town of Crawesmouth. Simutrans Extended (I used version #d109f9e) seems to have lost its bearings on the precise location:
- The town hall, the town name and the name on the map all are at 541,58.
- But when using the location button in the town list, you end up at around 589,56.
- Still further east, stops are named after Crawesmouth as far away as 636,59. Also the town is expanding furiously along the road in the direction of Crawesmouth town hall.
I have no idea how I managed this. I moved some towns around to create some space, maybe that's it. It took me the better part of two weeks to realize the full extent of what is going on. So reproduction is out of the question I'm afraid. But I do have the savegame for you.
Title: Re: Internal disagreement on town location.
Post by: ACarlotti on February 01, 2018, 08:43:57 PM
There's no disagreement here, just multiple possible ways of defining the centre of a city. 541,58 is the location of the city hall, but 589,56 is the geometric centre of the city limits (which range from (540,57) to (643,60), according to the city details window). You can also view the city limits in the map (by toggling the "City limits" button).

I think what has happened (to a first approximation) is the following:
1. Crawesmouth was intially adjacent to Lamcaster, with its Eastern edge at x=643.
2. You 'moved' Crawemouth, which entailed (I don't know exactly how you did it - I didn't realise that was possible) adding city buildings at around (541,58).
3. The limits of a city never shrink (so once a tile is within city limits, it stays within city limits), and had to expand to include the new location of the city buildings. Hence the city limits are now a long thin rectangle.

As a consequence of 3, all stops in (or near) the long thin rectangle are considered to be in (or near) Crawesmouth.

So no bugs here, just a limitation of the current city growth mechanism. I wouldn't consider this to be an issue as cities don't generally relocate and lose all association to their former location.

Of course, with the planned changes to town growth, this behaviour will probably be completely changed in the future.
Title: Re: Internal disagreement on town location.
Post by: AP on February 01, 2018, 10:24:26 PM
The server game "Canterbury" had a similar issue (old thread here (https://forum.simutrans.com/index.php?topic=17806.msg169628#msg169628)) which I have reported as a bug, now that, thanks to this thread, I understand it better as a city-limits issue.


I imagine James will opine shortly on whether it's inherited from standard or unique to experimental.
Title: Re: Internal disagreement on town location.
Post by: jamespetts on February 01, 2018, 10:59:48 PM
Indeed, this is the sort of issue that should be dealt with in the planned review of town growth.
Title: Re: Internal disagreement on town location.
Post by: Dutchman on Rails on February 02, 2018, 05:14:31 PM
@ACarlotti: @2: I  sometimes find towns too close to each other. I 'move' them by deleting the town hall of one (which completely removes all buildings and the name from map and town lost), then the roads and finally I place a new town elsewhere. I sometimes rename it to the original name, sometimes I don't bother. Apparently in this case (I removed and rebuilt about 5 towns in this game), I managed to provoke that not all of the town was deleted.

Edit: Come to think of it and taking another look at the map, I did not move Crawesmouth, but I believe I did move Lamcaster.
The point is the steel mill. It's been there from the beginning. When bulldozing a town hall, along with the buildings, all industries are also bulldozed. Even if it would have somehow survived, it would have been miles from the current location.

But Lamcaster is in a typical location chosen by me. Simutrans Extended normally has the town hall placed between 5 and 15 squared from a shore - be it sea or lake. If I place a town near a lake, I normally place the town hall within 5 squares, and Lamcaster fits that pattern.
Title: Re: Internal disagreement on town location.
Post by: ACarlotti on February 02, 2018, 08:12:08 PM
Ah, in that case it does sound more like a bug then. But not knowing exactly what you did makes it hard to be sure.