Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 8

Author Topic: Curb treesplosion by gradually reducing tree maturation as tree density increase  (Read 15757 times)

Sizik

  • Bay Watcher
    • View Profile

Ideally, if you're embarking in unexplored wilderness (and not former forests that were clear-cut for farmland or something like that), the amount of trees on the map should be relatively stable, since there have been (presumably) hundreds of years for the tree population to come to an equilibrium.
Logged
Skyscrapes, the Tower-Fortress, finally complete!
Skyscrapes 2, repelling the zombie horde!

Wheeljack

  • Bay Watcher
  • Likes explosions for their BOOM
    • View Profile

I fully support any scaling back of tree growth. The old growth was balanced for only getting one log per tree. It needs a massive rescale because I can live off the wood of one cutting endeavor for years, meanwhile my embark becomes so choked with trees that it's rediculous. My FPS tanks more and more, especially when they grow or leaves fall.
Logged

Deboche

  • Bay Watcher
    • View Profile

Ideally, if you're embarking in unexplored wilderness (and not former forests that were clear-cut for farmland or something like that), the amount of trees on the map should be relatively stable, since there have been (presumably) hundreds of years for the tree population to come to an equilibrium.
Yes, but as soon as you land, out goes the equilibrium. Theoretically, you'd affect the circulation of animals, use up land to build things, dwarves running around would disturb the soil, there'd be garbage and so on.

I fully support any scaling back of tree growth. The old growth was balanced for only getting one log per tree. It needs a massive rescale because I can live off the wood of one cutting endeavor for years, meanwhile my embark becomes so choked with trees that it's rediculous. My FPS tanks more and more, especially when they grow or leaves fall.
The idea was that you'd get a lot of wood as soon as you embark, then have to wait for trees to grow. They definitely grow a bit too fast.

But all of this seems to me like minor problems that in any case allow you to circumvent other problems that will eventually be solved. Namely, you should be able to plant trees yourself to ensure a steady supply of wood(and some species of trees grow very quickly). Also, stockpiles stop trees from growing so you can use those if it bothers you. If that feels too exploity, build paved roads.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile

I agree with Sizik's statement that the embark should be in an dynamic steady state until the dorfs disturb it. GoblinCookie's statement that the current embark tree population process would result in a same age forest is true, but probably better either ignored for the time being, or addressed by an improved generation, rather than a "room for growth" approach.

I agree with Deboche that there are some work arounds for the treesplosions, but the idea here is to make work arounds unnecessary by balancing the tree growth/regrowth. The stockpile trick also has some odd side effects when they're removed (e.g. for building something), namely instant tree maturation and sapling death, which leads me to suspect they're not as good for the FPS as one might hope. Paving takes a lot of dwarfpower, which tends to be in short supply for me, anyway, as well as a lot of material; the logs from cut down trees block building; dwarves are exposed to the dangers of the embark while building these roads which serve no purpose other than as a work around.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile

Easiest solution is a cap on the number of trees per biome type. It even allows for a more random distribution, as opposed to trees being evenly spaced apart.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

PatrikLundell

  • Bay Watcher
    • View Profile

A maximum number of trees per biome square solution is simple, but it also results in artefacts. Vigorous logging in a part of the biome will result in an evenly distributed regrowth, so continuous logging of some areas will eventually cause all the trees to end up in the spared patches. Of course, you could consider that behavior as a feature.
In my view, this proposal is an improvement of the current situation, regardless.
Logged

GoblinCookie

  • Bay Watcher
    • View Profile

I agree with Sizik's statement that the embark should be in an dynamic steady state until the dorfs disturb it. GoblinCookie's statement that the current embark tree population process would result in a same age forest is true, but probably better either ignored for the time being, or addressed by an improved generation, rather than a "room for growth" approach.

I agree with Deboche that there are some work arounds for the treesplosions, but the idea here is to make work arounds unnecessary by balancing the tree growth/regrowth. The stockpile trick also has some odd side effects when they're removed (e.g. for building something), namely instant tree maturation and sapling death, which leads me to suspect they're not as good for the FPS as one might hope. Paving takes a lot of dwarfpower, which tends to be in short supply for me, anyway, as well as a lot of material; the logs from cut down trees block building; dwarves are exposed to the dangers of the embark while building these roads which serve no purpose other than as a work around.

I am rather sure that Toady One would have liked to make things a steady state but people's computers only have a limited amount of memory and processing power.  The reason we have the present situation I gather is because the memory requirements to actually model a whole forest full of trees is too great for the average computer to handle.  The reason we have treesplosion is because the number of trees that are supposed to be there according to the core mechanics for tree growth, which do already space the trees out according to biome I think is larger than the memory could ever sustain on a global scale. 

Making all the trees identical would reduce memory requirements but would make for very boring forests.  The leaves me with a possible solution, rather than having the number of trees increase upon embark to fill up the map to the 'proper' number of trees that should be there you generate them immediately upon embark.  You start with the oldest trees, which is what the intial trees in worldgen are assumed to be and then you create trees of descending age but the same type from these initial trees, until we get to age 0 trees (saplings).  The map has a fixed number of tree points, the more wooded the biome the greater the number of tree points there are and the map gen fills them up in order around the oldest, initial trees whose offspring the newer trees are assumed to be.

Combined with the present system where trees refuse to grow too close to other trees we should end up with a situation where saplings only sprout in the newest areas of the forest, with the youngest trees.  All trees can be given a life expectancy, so the oldest trees on the map will eventually die off and fall over, making room for a whole new batch of saplings to grow up.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile

I'm not talking about a worldwide steady state, but for the embark only, generated when the embark is generated. Gradually generating trees of decreasing age is one (fairly good) way to get to this state before the dorfs and the wagon are plunked down.

Having fixed tree locations is probably not a good idea because it causes trees to grow in, well, fixed locations, which results in an artificial feel. The idea to have a fixed maximum number (but not locations) of trees in each biome of the embark is probably better.

The idea to basically grow forests in rings out from existing trees has several problems. One problem is that the tree species of a sapling currently seems to be basically random (out of the set legal for the biome), rather than based on actual biological spreading patterns. Another is that spreading patterns differ between species, where some drop their seeds close to the base of the tree, some spread the seeds with the wind, and many rely on animals to spread seed through varying processes, etc. In particular bird dropping spread seeds can basically end up anywhere. In the end, I think modelling tree offspring distribution is a very low priority DF implementation task, with the current random one being good enough.

Trees dying "of old age" is sort of realistic (sort of, since they tend to die in batches, such as by a storm, drought, fire, or severe attacks by pests). It also creates new problems in the form of tree cutting cancellation, a new FPS sink, etc. Of course, a new danger in the form of getting hit by a falling tree befits DF. Again, though, I don't think the gains are worth the effort for a long time (belonging to the DF polishing phase 20 years from now).

I just generated a random embark to show trees do indeed grow beside each other. The embark has at least one

.....
..T..
.T.T.
.....

and one

....
.TT.
....

Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile

I am rather sure that Toady One would have liked to make things a steady state but people's computers only have a limited amount of memory and processing power.  The reason we have the present situation I gather is because the memory requirements to actually model a whole forest full of trees is too great for the average computer to handle.  The reason we have treesplosion is because the number of trees that are supposed to be there according to the core mechanics for tree growth, which do already space the trees out according to biome I think is larger than the memory could ever sustain on a global scale.
Steady state = unvarying = what we have before embark.

No, the reason we have treesplosion is because the current values for spacing are insufficient. Surely deserts/savannas (away from oases) aren't meant to be dense with trees/cacti? The density at embark should be considered the natural state. Scarce means scarce.
« Last Edit: November 11, 2015, 08:59:57 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile

I agree that a site shouldn't be able to support a lot more trees than it gained through world gen; Where there is space and resources life tends to expand as it can. Under some circumstances the dwarves would logically be able to modify their environment to support more trees, but that goes beyond this topic.

Funnily enough I would say the number of cacti on embark is currently too low given how big saguaro forests can get in real life, but maybe I've just been unlucky.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

GoblinCookie

  • Bay Watcher
    • View Profile

I'm not talking about a worldwide steady state, but for the embark only, generated when the embark is generated. Gradually generating trees of decreasing age is one (fairly good) way to get to this state before the dorfs and the wagon are plunked down.

Having fixed tree locations is probably not a good idea because it causes trees to grow in, well, fixed locations, which results in an artificial feel. The idea to have a fixed maximum number (but not locations) of trees in each biome of the embark is probably better.

Having a fixed number of trees per embark is about the most artificial tree idea possible, it is basically like having some kind of localised version of the site limit, all the trees keep growing until they reach an arbitery limit and then for no apparant reason no more trees grow.  It leads to a situation where we end up having to cut down trees for no reason at all simply so our orchards can grow properly on a completely different part of the map. 

Trees do grow in fixed locations, nothing could be more natural.  Basically, trees grow everywhere that they can grow unless something (humans or animals) stops them from doing that, this means that at core it is all or nothing.  Either a place is a forest and has trees (of a particular type), or it does not have trees; in the former case the only limiting factor to how thick the trees can grow is the proximity of the trees to eachother, the more light, nutrients and water there is the closer together they can grow.  Those factors however (proximity) are already in the game I think so what isn't in the game is the limitations on where the trees can grow at all. 

We initially carve the map up into random zones (until we can actually model the real-world factors) and then we scatter the initial starting trees only in those zones.  We then create our second generation of trees in an area around the first generation of trees, then we do so again and again until we get the number of trees that mathematically speaking would cover the whole forest zone with trees.  The more unforested your area is, the less of the map is covered by the random zones so that in a desert you will be lucky to get one small cluster of trees but in a woodland the whole map is all one forest zone.

When we model in the aging of the trees it gets rather interesting.  Since the age of the trees is random within parameters, some of the trees on the map are about to die when the map embark actually loads.  This means instead of having all the trees scramble to snap up the inexplicitly empty space, we have the oldest trees randomly die to create space for the other trees to scramble for in a realistic fashion. 

The idea to basically grow forests in rings out from existing trees has several problems. One problem is that the tree species of a sapling currently seems to be basically random (out of the set legal for the biome), rather than based on actual biological spreading patterns. Another is that spreading patterns differ between species, where some drop their seeds close to the base of the tree, some spread the seeds with the wind, and many rely on animals to spread seed through varying processes, etc. In particular bird dropping spread seeds can basically end up anywhere. In the end, I think modelling tree offspring distribution is a very low priority DF implementation task, with the current random one being good enough.

Trees dying "of old age" is sort of realistic (sort of, since they tend to die in batches, such as by a storm, drought, fire, or severe attacks by pests). It also creates new problems in the form of tree cutting cancellation, a new FPS sink, etc. Of course, a new danger in the form of getting hit by a falling tree befits DF. Again, though, I don't think the gains are worth the effort for a long time (belonging to the DF polishing phase 20 years from now).

I do not see the problem with tree cutting cancellation because the trees can have a period of time between dying and actually falling over, nothing would mechanically stop you from chopping down a dead tree.  I am also not convinced that trees do not spring up close to eachother, from my experiance of the game trees of the same kind tend to be found in clusters after you have played for a while, since the original trees on the map seeded more trees of their own kind nearby.

In any case, I am not talking about trees growing during play, I am talking about building up a model that reduces the need for new trees to grow after embark by simulating the growth of a forest over a period of time prior to the embark.  That will very much increase FPS since trees growing is a major FPS drain (why FPS always drops in Spring+Summer). 


I just generated a random embark to show trees do indeed grow beside each other. The embark has at least one

.....
..T..
.T.T.
.....

and one

....
.TT.
....


Trees can grow next to eachother but only if both trees grew up at the same time.  Grown up trees have a 'kill-zone' around themselves that snuffs out any sapling (but not grown trees) that falls within it and the larger the tree is the greater it's kill zone.  It would make sense for the devs to have made the size of the kill zone bigger or smaller depending upon the biome.

I am rather sure that Toady One would have liked to make things a steady state but people's computers only have a limited amount of memory and processing power.  The reason we have the present situation I gather is because the memory requirements to actually model a whole forest full of trees is too great for the average computer to handle.  The reason we have treesplosion is because the number of trees that are supposed to be there according to the core mechanics for tree growth, which do already space the trees out according to biome I think is larger than the memory could ever sustain on a global scale.
Steady state = unvarying = what we have before embark.

No, the reason we have treesplosion is because the current values for spacing are insufficient. Surely deserts/savannas (away from oases) aren't meant to be dense with trees/cacti? The density at embark should be considered the natural state. Scarce means scarce.

The reason we have treesplosion is that the original trees are not supposed to be the final number of trees; they are also rather small, intended to grow larger over the course of the game in order to take up more space.  The question is thus a subjective one, how densely forested is the desert/savanna biome 'supposed to be'? 
Logged

PatrikLundell

  • Bay Watcher
    • View Profile

I interpreted fixed location as "this tile is a tree tile, that one is not". Now it sounds like "fixed location" actually means within the general area?

Having a fixed MAXIMUM number of trees is an approximation. It would be better if each sapling evaluated its surroundings and matured only if chance and conditions allowed (which is what I proposed). If the embark tree generation would employ this method on speed, you'd very rarely reach an actual maximum (and I'd use a cutoff time so a 20000 year old embark didn't get an overly long tree generation phase nor get very close to the maximum (with very scarce you may very well reach the the theoretical maximum, though).

First trees do not grow up next to each other, now they do under some conditions. There's obviously no way of convincing you bar displaying the actual code (which I obviously can't do). Consider that part of the discussion completed, as there is no point in me yelling "it is" and you "no it ain't" until Hell freezes over.

I don't know what your definition of "fairly young", but highwood trees usually are multi tile on embark, indicating they are of a sufficient age to thicken. The wiki doesn't state what age that is, however.

When it comes to how densely populated various biomes "are supposed" to be, there are probably some kind of scientific definitions of for instance when an area becomes a savanna or a desert.
Logged

Dozebôm Lolumzalìs

  • Bay Watcher
  • what even is truth
    • View Profile
    • test

Again: it is supposed to stay roughly the same.  Seriously guys, this is the part you argue about, what it's "supposed" to be?  The initial embark, barring magmafloods and fires and dwarven woodcutters, should have the same density as twenty years later.
Logged
Quote from: King James Programming
...Simplification leaves us with the black extra-cosmic gulfs it throws open before our frenzied eyes...
Quote from: Salvané Descocrates
The only difference between me and a fool is that I know that I know only that I think, therefore I am.
Sigtext!

GoblinCookie

  • Bay Watcher
    • View Profile

I interpreted fixed location as "this tile is a tree tile, that one is not". Now it sounds like "fixed location" actually means within the general area?

The context of the discussion was the question of how do we fill the initial map with the appropriate number of trees that should be there as opposed to the present situation where we start with a few undersized and identical symbolic trees on our map which then grow into a full forest as well as physically growing themselves.  What I was proposing was a mechanism for how the computer is to place a proper number of trees on the map upon embark in a way that looks like they grew up naturally without having to simulate 25 yrs of actual tree growth in one instant. 

Having fixed locations is how the computer avoids either having to physically have the trees already there during world-gen or having to track the individual growths of hundreds or even thousands of individual saplings.  The fixed locations are not to be used in the actual gameplay, the actual growth of the trees works based upon fixed zones, zones in which the original trees were placed. 

Having a fixed MAXIMUM number of trees is an approximation. It would be better if each sapling evaluated its surroundings and matured only if chance and conditions allowed (which is what I proposed). If the embark tree generation would employ this method on speed, you'd very rarely reach an actual maximum (and I'd use a cutoff time so a 20000 year old embark didn't get an overly long tree generation phase nor get very close to the maximum (with very scarce you may very well reach the the theoretical maximum, though).

First trees do not grow up next to each other, now they do under some conditions. There's obviously no way of convincing you bar displaying the actual code (which I obviously can't do). Consider that part of the discussion completed, as there is no point in me yelling "it is" and you "no it ain't" until Hell freezes over.

You are basically proposing the Status Quo, saplings do already die off as a result of various factors; indeed a map is normally covered in dead saplings who have died off for various reasons. 

Trees are normally prevented from growing next to eachother because the first tree to grow up kills off the saplings that are under it.  However no mechanism exists for killing off grown up trees, bar extreme circumstances like building a roof over them; meaning that two trees can grow up together in relatively rare instances when two adjacent saplings grew up at the same time before one of them could kill the other off. 

I don't know what your definition of "fairly young", but highwood trees usually are multi tile on embark, indicating they are of a sufficient age to thicken. The wiki doesn't state what age that is, however.

When it comes to how densely populated various biomes "are supposed" to be, there are probably some kind of scientific definitions of for instance when an area becomes a savanna or a desert.

Trees do not have an age because they are not tracked in world-gen save their location.  I know however from testing out playable elf forest retreats that the initial trees that you start with are far smaller than they end up being, over the course of the game the initial trees get a lot bigger.  This is very much useful to elves because it means that inside squares in the trees (where you can place beds and tables) gets bigger over time so there is more space to accomadate beds for your increasing population in your existing trees.  I modded in wooden statues so that the elves can artificially create inside areas on the trees to put beds in but as the game progresses placing newer statues are rarely needed as the existing trees you have already made your homes in get big enough to create new inside areas all on their own.

Again: it is supposed to stay roughly the same.  Seriously guys, this is the part you argue about, what it's "supposed" to be?  The initial embark, barring magmafloods and fires and dwarven woodcutters, should have the same density as twenty years later.

Indeed it supposed to but it cannot.  The game has to keep track of every single tree in the game and it cannot keep track of millions of individual trees all doing stuff, growing and dying off all the time.  This means for reasons of economy what we have a compromise situation where we intially start off with the few 'symbolic' trees, all of them basically identical in shape and far smaller than they will end up.  We then progress from that situation to having a situation with a forest of interesting trees of all manner of shapes and sizes, the situation that for memory reason cannot simply be created in world-gen. 
Logged

PatrikLundell

  • Bay Watcher
    • View Profile

The original proposal was tree population evolution after embark, not how to generate the embark tree population...

However, if "fixed locations" are supposed to mean only for embark tree population of the map (as opposed to how I understood it: cut down a tree, a new one grows up in exactly the same tile), that would probably sort of work. The problems with pre generated patterns are that:
- The terrain is uneven, so the pattern you'd try to fit would have holes in it for slopes, surface stone, various forms of water, etc.
- Embarks often contain several biomes, each of which would presumably have its own pattern.
- Finally, I don't think a reasonable speed evolution of the embark tree population would delay the embark by a significant time.

I don't understand the constant misunderstanding of the discussion about the situation in the embark to somehow involve generation of the complete tree population in the world. None of the other posters have discussed anything except the embark area. It's true adventure mode will have to handle trees in some way, but it does not have to be the same as the fortress mode one (and it probably shouldn't be).
Logged
Pages: 1 2 [3] 4 5 ... 8