Currently Online

Latest Posts

Topic: Trees and Terrains

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2550
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-07-02, 23:01

Because the issue of trees and terrains are coming up from time to time i think it is time for extra thread to this.

Just a few words about the current implementation:

  • There are 3 values related to each terrain which are called "terrain affnitys" (temperature, humidity, fertility)
  • Therea are 4 values related to each tree (preferred_temperature, preferred_humidity, preferred_fertility, pickiness)

Depending on this values a calculation is made if a tree grows very good or a tree grows not as good on a specific terrain. And this values are needed form a forester to plant a tree which is one of the best for a specific terrain.

The problems of current implementation, from my point of view, are described in this bug where the main problem is related to the mapmaker:

1.a It is not clear, which terrain affect treegrowing in which way. He may place f.e. mushroom trees (from blackland) on desert and while testing the map all the trees will probably dy before they get old

1.b. He may mix terrains from different worlds in one place nearby and treegrowing isn't as suspected.

Palm trees are another issue, because with the current implementation they are planted by foresters on meadow, which looks annoying (to some people face-wink.png ).

Some ideas to solve the current problems:

My personal (current) favorit implementation would be a "mapmakers decision" thing. If a mapmaker decide to plant whatever tree on whatever terrain, this is the rule. Automatic seeding of new trees depends then on the trees which are already in this area, independent form the terrain type (except "dry" and "dead" terrains). A problem with this idea are foresters who wants to plant trees where formerly no trees are growing (which sort of tree should they plant there? -> maybe one of the trees which are already found in this map?).


If you thinking about another solution please keep in mind:

backwards compatibility: We'd like to be able to still load maps from b18 and earlier


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-07-02, 23:17

well, i exposed already my idea inn the link kapuuttnik provided, I only want to add that its impelmentation would be very simple programming-wise and it would be foolproof.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-07-03, 18:32

I think that current model (humidity, fertility, temperature, pickness) is not the perfect one, but it is good enough to make it better. How? There are few possibilities:

  • Tweak values of humidity, fertility, temperature, pickness (lots of values)
  • Change a bit equations (now they are basicly expontents with linear argument)
  • any other method you can think face-wink.png

I was one of the designer of current model and I will vote for upgrading current model instead of complete change.

First values (fertility, ...) were given "from hand" (no specific simulation were created before putting to widelands), and they were wrong. Also they changed behaviour of trees everywhere. Some maps were very hard to play (build18 and before). So SirVer proposed and created simple program that tweaked the values to current state. This program changed the values to current state: trees are growing as they were growing before, plus palm trees like ice face-smile.png

There is a possibility to change the values again using the same program, but different initial data. That will (hopefully) change the palm trees on ice. But it will not solve the problem of mix terrain types. Why? Because I know that most of people don't like (or even understand) equations which will make or make not some trees growing on different types of ground. Also mixing is strange too.

So I was testing (with help!) current state of trees-soil dependances, and I will try to make equations that will help people to understand how everything is working, but it is not enough.

If I will solve last problems (I will give some equations which will tell how specific tree will grow on specific terrain type), I can make simple www-calculator. How can it work? You pick some soils you want to mix (or only one which you want to use) and the site will tell you which tree types will grow the best. I know that this is not the best solution, but it should be enough for map makers for now. Also this will cause some "more work to do" and some (lazy) people will not like that face-tongue.png

The idea of biomes or tree resources are good for developers, but for players it is not enough. Why? Because players will not know what resources are where. That is the main problem for Widelands itself.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 351
Ranking
Tribe Member
Posted at: 2015-07-03, 18:46

My advice? Have 0 fertility/0 humidity kill off any trees on top of it, no matter their pickiness. After all, by then we've gone beyond "little soil" and "little rain" to "no soil" and "no rain".


Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2550
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-07-03, 19:10

einstein13 wrote:

The idea of biomes or tree resources are good for developers, but for players it is not enough. Why? Because players will not know what resources are where. That is the main problem for Widelands itself.

With "resources" you meant "good place for planting trees" ? There is a Geologist who could may do that.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1668
Ranking
One Elder of Players
Posted at: 2015-07-03, 19:17

givven how the equations work, it is very surprising that palm trees like cold. I mean, suummer terrains, where palm grows, should be very warm, palm trees should like warmth, so a very cold terrain should kill them. unless they have 0 pickyness. I don't know, maybe just setting those values manually to make sure that temperature differences are high enough that summer trees will prefer summer terrains and viceversa should be easy to do. if those values were determined using an automated program, maybe that program gave wrong values. In fact, if you give me the full equation, i volunteer to try to find good values (i still need someone else to try implementing them because i can't program)


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 351
Ranking
Tribe Member
Posted at: 2015-07-03, 19:46

I imagine intersections would use the average of the six triangles around them. Don't want trees on the edge of lava? No problem; set them to -1000 fertility (assuming fertility is normally 0-100).


Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 20:48
Posts: 2550
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-07-03, 19:58

For convenience i provide two ods-spreadsheets which contains the actual values:


Top Quote
Tibor

Joined: 2009-03-23, 23:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-07-03, 21:34

I have prepared a table about my proposal on biomes. Basically it is a step back but will some customization. I created 9 biomes (see columns headers) and grouped trees to 5 groups (rows). The % is probability of growth of such group of trees in this biome. 0% means never. 100% means the biome is ideal for this group of trees.



The model is quite trivial and makes sure there would be no surprises like palms in arctic biome.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-07-04, 00:31

thanks, Kaputtnik! It will help me a lot face-smile.png

@Tibor:

I think that your idea will break some dependences on some soils. For example on Greenland there is barren steppe which is ideal non-trees ground. In your model every soil has at least one specie that will grow on them.

Some maps will be hard to play with your idea: you will be able to colonize any place (mechanism for that is quite simple: destroy any obstacles), but you will not be able to build anything around, because all place will be with trees. I am talking about playing maps with lots of trees on island/ continent where your ship is going to.


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote