The International Simutrans Forum

 

Author Topic: Feature_request: make regions optional / configurable / visible  (Read 327 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3691
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Feature_request: make regions optional / configurable / visible
« on: January 08, 2021, 11:40:58 PM »
While regions are nice feature, they complicate things if one wants to play on real map of any other country than UK.
Also it makes problems with maps that for some reason lack some regions - perhaps created with incomplete simuconf.tab when this feature was very new.

To make it better the following would be nice to have:
- option allowing to place buildings/factories anywhere manually - similar to "ignore climate"
- global switch to ignore regions (advanced settings)
- make the region boundaries configurable in advanced settings
- show the regions somehow - minimap, or in game somewhat like station coverage?

Offline Matthew

  • *
  • Posts: 544
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Feature_request: make regions optional / configurable / visible
« Reply #1 on: January 09, 2021, 12:44:17 AM »
I support this request. It is not only difficult if you want to play on a map that does not represent the British Isles.

Firstly, if you have a map with sea in the wrong place, you can completely miss out on important chains like coal.

Secondly, I don't think regions are explained anywhere in-game or even in the features overview. The whole thing is totally mystifying to new players.

I definitely like the feature and appreciate the effort that went into creating it, but the implementation is still incomplete.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Feature_request: make regions optional / configurable / visible
« Reply #2 on: January 09, 2021, 01:18:28 AM »
IMO, since the region is square, it is very weird to display it on the map. I wonder if this can be improved.
Another weird thing is that cities can span different regions.

One of the ideas is to set the region at the center point. The tile recognizes the center point of the nearest region or the region of its city as its own region.

The climate map patch of standard makes changes to the minimap, so the coder may be able to make changes at the same time or later.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Feature_request: make regions optional / configurable / visible
« Reply #3 on: January 10, 2021, 01:31:35 PM »
The idea of the implementation of regions was to make it a very lightweight feature: one that required minimal coding effort, as my time is very limited, and one that requires minimal memory usage/bandwidth, as both of these things are also performance critical on larger maps. The idea of using basic squares is to allow regions to be stored as two co-ordinates per region, involving minimal memory usage. A more sophisticated system would entail storing region data on tiles, which would involve an unreasonably high degree of memory usage, or would involve a very complex algorithm using multiple co-ordinates (which would give a region made up of multiple intersecting squares) which would only look slightly better than the current one square per region system and would take a very large amount of time and effort to program and debug.

However, an option to ignore regions in the same way as climates when manually placing buildings, and an option to use only region 0, would be relatively easy to implement and would consume excessive computational resources, although my own extremely large backlog of higher priority tasks means that this is not a high priority for me at present.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10528
  • Languages: De,EN,JP
Re: Feature_request: make regions optional / configurable / visible
« Reply #4 on: January 10, 2021, 01:48:26 PM »
Having a region map in an 8 bit array (like the climate map in standard) would be even faster than searching through coordinate pairs to determine regions and would allow 255 different regions with very little memory overhead. This can allow for a complicated system for calculation during generation since it is only done once at startup (or one can store the coordinated, and then generate this map on load from coordinates; but a map with long rows of identical data should compress very well (and fast).