The International Simutrans Forum


Author Topic: New industry placement type: Near City  (Read 16791 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10214
  • Languages: De,EN,JP
Re: New industry placement type: Near City
« Reply #35 on: July 20, 2012, 07:20:04 PM »
Indeed, clustering the industries may help. Because the search for a suitable climate on 16 millions tiles with 10ms per tile will take 160s on a 4000x4000 map ... not to mention that many factories have further restrictions. If this is always restricted to (lets say) a 256x256 area around other factories of the same type, then it could be speeded up. However, then it would only give one cluster per type. Hence further refinedment if this is still needed.

Offline dom700

  • *
  • Posts: 44
Re: New industry placement type: Near City
« Reply #36 on: July 20, 2012, 07:54:54 PM »
Hmmm, the placement time for industries is already quite bad. I had a pak128 game place a new supermarket industry chain on a 3000x3000 map, and the 50 new industries took quite a bit. Therefore this doesn't really sound like an issue to me.
Why does it necessarily have to check all tiles on the map?

As an example here is, how I imagine a new supermarket (only breweries) chain would be made with the new system: (Note: Pak128 chain)

1. It would place the supermarket, most likely in the city which is expanding (no big deal)
2. It would place the breweries, probably also in the same city, or also checking cities in a given distance, which is expanding if no suitable city is found
3. It would place the grain farms, first checking the immediate vicinity of the breweries for suitable (fertile climate) tiles, and then expanding (probably checking 100x100 tiles at the very most for a "normal" map)
4. It would place the coal and glass mines, checking for suitable mining locations, afterwards placing the glass factory somewhere in the center of the mining area). To check for these mining locations, I would probably roughly check a larger area than the grain farms, but with a lower resolutions, like every 5th tile in a 250x250 area or so.

Personally I do not like the cluster idea at all. I do not want to have a 3000x3000 map, which has all coal mines in one corner of that map. That would make playing sickening.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5668
  • Languages: EN, NO
Re: New industry placement type: Near City
« Reply #37 on: July 20, 2012, 10:05:17 PM »
Does it really take 10ms per tile just to check the climate? I would have expected that 10ms would include checking if all tiles are free and can be leveled.

And on a 3000x3000 map, there should, in my opinion, be several coal mine hot spots scattered across the map, but probably no more than 10.

Offline wlindley

  • Devotee
  • *
  • Posts: 1028
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: New industry placement type: Near City
« Reply #38 on: July 21, 2012, 02:02:51 PM »
Perhaps a factory's .dat file could support the type= parameter.  Factories (e.g., newspaper stands) with type=res would only be built in proximity to a sufficient number of residential tiles, for example; a factory with type=ind (e.g., textile mill) would be built only near industrial buildings, and so on.  A factory would then attract nearby construction of buildings of that type.

Perhaps this could even support a factory with type=tow (town hall), which would restrict its construction to being near a city center, or type=harbour to have it built only near a waterfront station?

Offline isidoro

  • Devotee
  • *
  • Posts: 1137
Re: New industry placement type: Near City
« Reply #39 on: July 21, 2012, 09:57:12 PM »
Nice idea!  I like it!

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 4102
  • Cake recipes are cool... REALLY!
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: New industry placement type: Near City
« Reply #40 on: September 01, 2012, 06:51:50 PM »
Since the topic *had* derailed a bit (not derailed, but the subject expanded a bit), I thought I should have split it. Doing it now.

Topic split: A new geography for Simutrans: terrain, climate, towns, factories and stuff