The International Simutrans Forum

 

Author Topic: Some gameplay experiences.  (Read 2198 times)

0 Members and 1 Guest are viewing this topic.

Offline Dutchman on Rails

  • *
  • Posts: 239
Some gameplay experiences.
« on: March 28, 2011, 08:14:54 AM »
Hi James,

I would like to share some gameplay experiences with you that might be of help.

Setup: Simutrans-Ex 9.3 with Pak128.Britain-Ex 0.8.

- When a town builds or upgrades houses, the population has a tendency to jump with it. I'm not sure if this was intended, but it prohibits really slow town growth. Another side-effect is that this means the number of homeless only drops a little, so that houses are often build in 4s or 5s.

- When starting a scenario on a 1408x672 map with 30 towns and more than 5 industries, it seems the game can no longer find enough suitable locations for industry chain endpoints (shops) and some end up halfway between towns.

I hope you find this helpful.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Some gameplay experiences.
« Reply #1 on: March 29, 2011, 11:50:53 PM »
Thank you for your reports: that is most helpful. However, it seems that both behaviours occur in code that is unchanged from Simutrans-Standard. Have you checked to see whether this can be reproduced in Standard?

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Some gameplay experiences.
« Reply #2 on: April 03, 2011, 05:14:59 PM »
Hi James,

I did not check this yet. I'm not sure if it's bugs anyway, that's why I mentioned it as experiences. If I find the time, I'll do a check.

One thing that I'm sure is 'works as designed', but might be a wish if it would be possible to change, is that towns can not bridge the rivers (or small estuaries).

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Some gameplay experiences.
« Reply #3 on: April 11, 2011, 08:34:20 AM »
Hi James,

I was able to check if the industry reacts the same in Simutrans Standard now. Indeed it does.

The reason appears to be mostly the factory_spacing setting. When a 'new industry chain' or 'industry expands it's chain' event occurs, this setting is only verified for the industries within the chain. Other chains are ignored. Which is good, because you get something like a shopping center with the endpoints grouped together in the towns, and the industries further away.

But I get the impression that the chains opening at the start of the scenario are all verified against the factory_spacing setting, which leads to running out of space.

With regards to towns building houses and jumping in population, that would be a lengthy and tedious replay. I'll take a look in the source though when I have the time, to see if I can find the logic there.

Hoping this helps.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Some gameplay experiences.
« Reply #4 on: April 11, 2011, 09:38:53 PM »
This is interesting - thank you very much for testing that. Do you think that this behaviour should be changed in Standard?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Some gameplay experiences.
« Reply #5 on: April 12, 2011, 01:52:04 PM »
An exclusion map is drawn in the factory builder (fabrikbauer.cc) which take care of exclusion zones for any factory. Both routines use is_factory_at() which queries the content of this exclusion map.

Maybe the map is not correctly reinitialized after loading? (fabrikbauer_t::init_fab_map(welt)?)

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Some gameplay experiences.
« Reply #6 on: April 30, 2011, 10:46:35 AM »
Hi James, Prissi,

Sorry to be away so long, I got some distractions from other games.

Regarding industry.

@Prissi, I'm not sure I follow entirely what you mean, but I get the impression you say that industries should always respect each others' exclusion zones, even when not related inside the same (potential) industry chain? In that case you may be right that upon load an anomaly shows up. But especially with Simutrans Experimental and keeping in mind the new experiments with Pak128.Britain-Ex (much smaller productivity of endpoints), I'd say that gameplay-wise the anomaly is the desired behaviour. For me a bakery industry chain doesn't need to respect the exclusion zone of a clothes shop one, they do not share any goods to be transported.

@James, I have no opinion if this should be changed in Simutrans Standard. I haven't been playing that one for a long time now as I consider some of the features in Experimental 'Must Haves'.

Regarding city growth.

I have trouble reproducing this so far in Simutrans Standard (My towns do not grow yet). I've taken some looks in the code, and it seems that mostly it revolves around two points.

Edit May 10: After a re-install of Simutrans standard I could reproduce this.

In simcity.h, you will find the following calculations for population, homeless and unemployed.

Code: [Select]
/**
* ermittelt die Einwohnerzahl der Stadt
* "determines the population of the city"
* @author Hj. Malthaner
*/
sint32 get_einwohner() const {return (buildings.get_sum_weight()*6)+((2*bev-arb-won)>>1);}

uint32 get_buildings()  const { return buildings.get_count(); }
sint32 get_unemployed() const { return bev - arb; }
sint32 get_homeless()   const { return bev - won; }

Beue_gebeaude in simcity.cc indeed adds a number to won (if the building is a house) or arb (if it's an industry), if I see it correctly:

Code: [Select]
if (sum_gewerbe > sum_industrie  &&  sum_gewerbe > sum_wohnung) {
h = hausbauer_t::get_gewerbe(0, current_month, cl, new_town);
if (h != NULL) {
arb += h->get_level() * 20;
}
}

if (h == NULL  &&  sum_industrie > sum_gewerbe  &&  sum_industrie > sum_wohnung) {
h = hausbauer_t::get_industrie(0, current_month, cl, new_town);
if (h != NULL) {
arb += h->get_level() * 20;
}
}

if (h == NULL  &&  sum_wohnung > sum_industrie  &&  sum_wohnung > sum_gewerbe) {
h = hausbauer_t::get_wohnhaus(0, current_month, cl, new_town);
if (h != NULL) {
// will be aligned next to a street
won += h->get_level() * 10;
}
}

I have to admit I do not understand enough about C++ or the Simutrans design to completely understand the calculations, but basically the result I believe should be that if a house is built, bev should stay the same, but won should be increased with the population of the house. If the effect of building a house has an impact on bev, that explains what I see. Am I making sense so far?
« Last Edit: May 15, 2011, 11:19:02 AM by vilvoh »

Offline Dutchman on Rails

  • *
  • Posts: 239
Re: Some gameplay experiences.
« Reply #7 on: May 15, 2011, 11:00:53 AM »
Hi James,

I've taken a further look and observed the effects in the games closely.

First off a minor thing, I think the following comment is not correct:

Code: [Select]
if (h == NULL  &&  sum_wohnung > sum_industrie  &&  sum_wohnung > sum_gewerbe) {
h = hausbauer_t::get_wohnhaus(0, current_month, cl, new_town);
if (h != NULL) {
// will be aligned next to a street
won += h->get_level() * 10;
}
}

If I get the code correctly, won controls the total population that is not homeless, so the line the comment refers to has nothing to do with aligning houses to the roads, but increases won by 10 times the level of the house, thus decreasing the number of homeless (bev-won) by the same amount.

By now I get the impression that the point I mentioned about the population jumping with the building of buildings (and decreasing slightly when an industry or commercial building is built) is 'works as designed', as per the line in simcity.h:

Code: [Select]
sint32 get_einwohner() const {return (buildings.get_sum_weight()*6)+((2*bev-arb-won)>>1);}
However, when I observed the effects in the game, I noticed something. When one house is built, I see the number of homeless (bev-won) decrease by on or about the number I would expect. But when several houses are being built simultaneously, I only see the number of homeless decrease by the number I would expect for one house, so not for all the houses.

I hope this helps you.
« Last Edit: May 15, 2011, 11:18:18 AM by vilvoh »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Some gameplay experiences.
« Reply #8 on: May 15, 2011, 11:58:36 AM »
Dutchman on Rails,

the part of the code that you have reproduced there is not specific to Experimental, so this would work the same in Standard - perhaps Prissi can assist you?