The International Simutrans Forum

 

Author Topic: World height  (Read 302 times)

0 Members and 1 Guest are viewing this topic.

Offline Andyh

  • *
  • Posts: 74
World height
« on: October 31, 2018, 04:15:18 AM »
I tried using the configurable world height feature in 120.4 just now using a loaded height map.  I set the maximum and minimum heights to 127 and -127 respectively; however,  I could not produce a map with a height greater than 30.  If this is the intended behavior I can't really see the value of permitting heights of up to 127.  How would a map with such altitudes ever be generated?  I tried using the "Maximize Height Levels" check box but that seemed to have no effect at all.  Is this a bug or am I misinterpreting the intended behavior of this function?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: World height
« Reply #1 on: October 31, 2018, 05:09:42 AM »
You have to use 120.4,1, this is broken in 120.4

And the terrain generator will never produce such maps, they can be only made from heightmaps.

Offline Andyh

  • *
  • Posts: 74
Re: World height
« Reply #2 on: October 31, 2018, 05:23:20 AM »
I'm actually using the latest nightly 120.4.1 r 8605.  I'm using a height map. 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: World height
« Reply #3 on: November 01, 2018, 04:12:54 AM »
I think you have to edit simuconf.tab and start with an empty map. Otherwise the settings will not be active, when loading the heightmap.

Offline Andyh

  • *
  • Posts: 74
Re: World height
« Reply #4 on: November 01, 2018, 06:20:32 AM »
I have edited simuconf.tab (the copy in the main simutrans folder), but what is meant by "start with an empty map"?  Thanks.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: World height
« Reply #5 on: November 01, 2018, 07:37:24 AM »
Sorry, I looked at the relevant code, and with height maps you can go from 29 to -34, depending you your water level setting. Since the Simutrans engine has some drawing issues with too high mountains, the limit was set like this (however, it means still 53 different height levels, i.e. somewhat nice mountain then requires about 100x100 tiles base area.

The formula is (red*2+green*3+blue)/24-34 for pak64 and all with double height bridges, and (red*2+green*3+blue)/48-18 for pak128 and other with single height bridges.


Offline Andyh

  • *
  • Posts: 74
Re: World height
« Reply #6 on: November 01, 2018, 02:37:54 PM »
Got it.  Thank you for looking into this.  Not quite how I thought it was going to work but definitely consistent with the behavior I’m seeing.