News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

New industry placement type: Near City

Started by colonyan, July 16, 2012, 09:27:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi

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.

dom700

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.

Ters

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.

wlindley

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?

isidoro


IgorEliezer

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