Start with one piece of living wood. Assign it life energy and let it grow. With each growth energy decreases. Depending on energy it can randomly branch in random direction with length of branch depending on energy; living wood remembers the branching stage. Randomly add leaves above trunk height with random sizes depending on if we are in end growth stage or not.
If not in branch thicken the living wood a bit to make thicker main tree trunk. The growth stops when living wood is out of life energy.
local TREE_SIZE = 30;
local TRUNK_SIZE = 10;
local BRANCH_LENGTH = 30.;
what remains to be done:
-rewrite code so that it uses http://dev.minetest.net/VoxelManip,
-save "DNA" into each tree seedling so that we can have different types of trees
-few fine tweaks
Wow! This is amazing idea! And looks very impressive!
You can do some new biomes with this trees.. Like getting settings from mapgen, and plant somewhere big trees, or somewhere little..
I like it!
Took a quick look at the screenshots and code. I like both the idea, and how simplistically it seems to be implemented! I might use this for the trees of a Minetest game I'll be making, but need to test it a bit first.
Can you please specify what license the script is under? May I include it as LGPL like most mods are?
You want to make it use vmanip, do you want a whole tree to appear immediately (faster) or the current way (being able to see it growing, vmanip may decrease speed because of low nodes count)?
MirceaKitsune wrote:Took a quick look at the screenshots and code. I like both the idea, and how simplistically it seems to be implemented! I might use this for the trees of a Minetest game I'll be making, but need to test it a bit first.
Can you please specify what license the script is under? May I include it as LGPL like most mods are?
Thanks. I actually wrote my own tree growth function from scratch, since this mod wasn't working well for me. But it was inspired by its idea, and uses the same life-based mechanism. I'm not sure if I'll publish it as an individual mod, but it will be featured in my game.
This mod has always been on my mind since I stumbled upon it.
Here is "Aberrant trees", a refinement (or rather, a degeneration) of RND's original mod.
I have centralized the tree parameters into a tree structure, which allows to define different tree "models". One can change the trunk and leaves materials, the height of the trunk, the global size of the tree, etc.
The mod still does not check for protections, but at least it will not replace non-air nodes.
The ABM has been replaced by node timers.
I plan to add an API function to let other mods register their own models and to add a "fruit" slot. Also the "growth heads" will probably be made invisible (or maybe "glowing air").
Attached is my "preview" version. No crafting recipe, give yourself a "a_trees:sapling" and plant it. The tree you will get is of random type. It can be a "regular" tree or... a stone tree with coal leaves, an obsidian tree with obsidian glass leaves, an ice tree, or a brick tree with mese lamp leaves. That kind of mildly crazy stuff.
For anyone who wonders, I think it won't work as-is if you try to place those saplings at mapgen time because their growth timers won't be started. One would need to use a LBM to start them.