The International Simutrans Forum

 

Author Topic: Per City Growth Control  (Read 3764 times)

0 Members and 1 Guest are viewing this topic.

Offline colonyan

  • Devotee
  • *
  • Posts: 526
  • Full and Warm
Per City Growth Control
« on: October 24, 2008, 04:29:29 PM »

   This is to control different cities growth. Some sand box play style game user may find useful to be able to restrict the
   growth of cities of their choice. Those they want to keep it as rural area.

   Only one control.
   A simple window with one line list of cities and check mark box at the right of the city name.
   At default, they are checked to allow growth.
   Player may turn off the check box for cities they want to halt the growth.

   I know this is against the idea of simutrans of all growth should be affected by player's work on transportation.
   But some of player like me play it as a personal garden or that kind of sort. I wished some places stays rural forever.

   [Game allow to halt the growth intentionally providing very few service. But this seems not "right thing" to do....]

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1392
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Per City Growth Control
« Reply #1 on: October 24, 2008, 10:07:52 PM »
Alternatively, there have been suggestions in the recent past to influence city growth with a parameter for each city. In this way you can not only simulate rural areas, but also boom towns etc. This parameter could be hidden for normal players but visible and editable by the public player.

I don't think this is very difficult to program for a novice to Simutrans source. I might even try it during the Christmas holidays.

Offline colonyan

  • Devotee
  • *
  • Posts: 526
  • Full and Warm
Re: Per City Growth Control
« Reply #2 on: October 25, 2008, 03:08:54 PM »
That's good to hear! Hope it will see the light of day sometime in the future.

[ADD]
Maybe attractor city and population distributing cities might add more flavor.

Distributors gives some of its growth to attractor. This will simulate the migration to the largest cities which had
on beginning of 20th century.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9557
  • Languages: De,EN,JP
Re: Per City Growth Control
« Reply #3 on: October 25, 2008, 07:06:48 PM »
The growth rates of cites are already different, until 100 the will growth a 1/4th speed, and from 10000 on they will grow with 4x speed.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: Per City Growth Control
« Reply #4 on: October 26, 2008, 08:14:29 PM »
The growth rates of cites are already different, until 100 the will growth a 1/4th speed, and from 10000 on they will grow with 4x speed.

But why growing city of recent version is too fast ?

In old versions, if bev is less than 1000, max growth was 1.
 (yes, 1 not 2, because of +1)
But in current version, max growth is (80<<6)/400=12.8

So, if city have only 1 factory and is full of goods.
It always keep growing 3. It's too fast.

Code: [Select]
} else if (bev < 1000) {
wachstum = (pax_transport * 2) / (pax_erzeugt + 1);

Code: [Select]
sint32 pas = (city_history_month[0][HIST_PAS_TRANSPORTED] * (40<<6)) / (city_history_month[0][HIST_PAS_GENERATED] + 1);
sint32 mail = (city_history_month[0][HIST_MAIL_TRANSPORTED] * (20<<6)) / (city_history_month[0][HIST_MAIL_GENERATED] + 1);
sint32 electricity = 0;
sint32 goods = city_history_month[0][HIST_GOODS_NEEDED]==0 ? 0 : (city_history_month[0][HIST_GOODS_RECIEVED] * (20<<6)) / (city_history_month[0][HIST_GOODS_NEEDED]);

// smaller towns should growth slower to have villages for a longer time
sint32 weight_factor = 100;
if(bev<1000) {
weight_factor = 400;
}
else if(bev<10000) {
weight_factor = 200;
}

// now give the growth for this step
wachstum += (pas+mail+electricity+goods) / weight_factor;
« Last Edit: October 26, 2008, 08:31:23 PM by z9999 »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9557
  • Languages: De,EN,JP
Re: Per City Growth Control
« Reply #5 on: October 26, 2008, 08:41:55 PM »
The old factor 1 is not directly related to the new factors (see for instance 88.10.5 source). The old factor had a 1:1 relation, while the new factor had 1:16th relation to take care also for very low growth rates. In fact the growth rates are similar, even a little sloer for the new ones.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: Per City Growth Control
« Reply #6 on: October 27, 2008, 06:49:29 AM »
while the new factor had 1:16th relation

Thank you. Okay, I found the code, and I had wrong idea about that.
But still it feels faster than old versions.

In the case that I wrote in last post, city growth every 44 seconds.

Passenger transport is the same. In old versions, it was 1 or nothing.
Keeping 50% transport is very difficult for small town. Usually it only happens at the beginning of the month. So, small town growth slowly.

But in current version, if we made 20% passenger transport, city growth every 128 seconds, isn't it ?

In recently, I often hear many people asking how to reduce city growth.
I don't think old version is best, but ...

Okay, someone may feel current version is better than old one, so I will stop to talking about this.  :)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9557
  • Languages: De,EN,JP
Re: Per City Growth Control
« Reply #7 on: October 27, 2008, 10:58:13 AM »
Well, city growth is faster, since:

- pasenger and mail are not add seperately (thus 50% of passngers and no mail ended up with 40%,
- not rounding to zero but rounding to 1/16th ouccurs (many small growth steps accumulate)
- goods are also included