by loftar » Sun Aug 02, 2009 10:59 am
I'd probably use the current "map decay" loop, which picks out a point at random every now and then, and spawn a tree there only if 1) it's a forest tile, 2) there are other trees within a certain radius and 3) there is nothing else within another, smaller radius. That way, forests would only grow back of there are trees left, it would only grow at its own edges, and it would reach a certain maximum density. What I like the least about that manner of implementation is, really, that I'd have to "fine-tune" the target tree density so as to match as approximately as possible what the mapgen produces, which seems kinda ugly.
"Object-oriented design is the roman numerals of computing." -- Rob Pike