The International Simutrans Forum

 

Author Topic: Bug: city growth across miles of open water  (Read 1280 times)

0 Members and 1 Guest are viewing this topic.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Bug: city growth across miles of open water
« on: January 12, 2018, 07:51:48 PM »
Not sure where to post this one.


If you look at the Canterbury server game using Simutrans Experimental pak-gb-ex, and try to find the town of "Wilcaster", you will see it exists, according to its city list entry, at (5435,2029), and has a population of around 13000 souls. 


Except those co-ordinates are deep water, far off shore.


I have passengers wanting to go there waiting at stops, and if I examine the stop lists to find one in Wilcaster, I can establish that the city hall of the town is actually at (5447,1885)


So it is somehow mis-reporting the location by roughly 150 tiles in the Y axis and 10 in the X axis.

Update: title clarified.
« Last Edit: February 01, 2018, 10:25:39 PM by AP »

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Bug: city growth across miles of open water
« Reply #1 on: February 01, 2018, 10:23:14 PM »
Update: it appears that Wilcaster has managed to grow a suburb of the main settlement across 300 tiles of ocean, since it is otherwise hemmed in by neighbouring towns.


Reviewing the "city limits" minimap overlay shows the problem.



The spot in the ocean is the geographic centre of the two halfs of the town.





I don't think the city generation / growth code ought to be able to do this!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bug: city growth across miles of open water
« Reply #2 on: February 01, 2018, 10:58:28 PM »
Thank you for noting this. I will have to look into this in more detail when reworking the town growth code in the future.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4597
  • Languages: EN, DE, AT
Re: Bug: city growth across miles of open water
« Reply #3 on: February 05, 2018, 09:00:57 AM »
Could be caused by the townhall placement code: If townhall is replaced by a larger one, and no suitable spot is found close to the original one, then such things may happen.

Offline Phystam jp

  • *
  • Posts: 246
  • Pak256.Ex developer
  • Languages: JP, EN, EO
Re: Bug: city growth across miles of open water
« Reply #4 on: February 05, 2018, 02:41:49 PM »
When a city gets a chance to build a building, the city looks for some place which can be built. If there are no places to build, the city extends its city area in one direction. But there are no limitations (sea/mountain blocks). I think this is the reason why the city can go over sea.
I think the easiest way is checking climate of tiles...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Bug: city growth across miles of open water
« Reply #5 on: February 05, 2018, 11:52:22 PM »
When a city gets a chance to build a building, the city looks for some place which can be built. If there are no places to build, the city extends its city area in one direction. But there are no limitations (sea/mountain blocks). I think this is the reason why the city can go over sea.
I think the easiest way is checking climate of tiles...

Interesting. That would suggest that this issue is not confined to Extended, but also exists in Standard. In principle, however, this should be solved by the planned revised town growth algorithm that is intended to work globally.