Is the slow speed of trees to grow on purpose?

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

What I noticed with the new release is that leaves decay is finally pretty fast and takes only a few seconds, which is very good.

But on the other hand when I create a tree farm (a checkerboard pattern of trees and torches) it takes the trees 3-5 ingame day/night cycles to start growing. Usually its only one tree after that time and another 2-3 ingame day/night cycles later there are only 4-5 out of 10-15 trees grown.

I tried with and witout mods. No difference. I noticed that in the previous release but I have a feeling that it now takes even longer for trees to grow.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: Is the slow speed of trees to grow on purpose?

by Sokomine » Post

It feels the same to me. Trees seem to take forever to grow. Their growth function was afaik changed to a static time. Perhaps something random and much smaller would be a better idea. Realism doesn't always work...we need tons of wood for our projects.
A list of my mods can be found here.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: Is the slow speed of trees to grow on purpose?

by Chibi ghost » Post

I planted some of the new bushes and it seems to take forever to grow

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post

The answer is yes. Sofar used a lot of maths to calculate the grow time.
Tree saplings grow in 40-80 mins, bushes half that.
The growth time used to be random between 0 and infinity, so some would grow immediately, giving the impression of fast growth. The average grow time is unchanged in the new method but now there is a minimum grow time (2 days).

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why? Is there at least a way to change that (either by configuration or via mods)?

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: Is the slow speed of trees to grow on purpose?

by Chibi ghost » Post

if the speed bothers you install bonemeal

ps if you really can't wait cg-decor but that has some problems in it's self
which I cant be arsed to get in to
Last edited by Chibi ghost on Sat Jun 10, 2017 19:51, edited 1 time in total.

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: Is the slow speed of trees to grow on purpose?

by PEAK » Post

Linuxdirk wrote:
paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why?
I agree.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post

Linuxdirk wrote:
paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why? Is there at least a way to change that (either by configuration or via mods)?
Tree growth is guaranteed within 80 mins, before, some saplings would take longer.
As i wrote, sofar used complex statistical maths to calculate the time range equivalent to the old behaviour, you can study it yourself in the PR thread.
It is equivalent.
As i wrote, it only seems slower because there is a minimum grow time instead of an occasional tree growing almost immediately. 40-80 mins *sounds* too long to me too, but i trust sofar's maths.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Is the slow speed of trees to grow on purpose?

by maikerumine » Post

Linuxdirk wrote:
paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why? Is there at least a way to change that (either by configuration or via mods)?
Yes, in the nodes lua, change the sapling time to a smaller number.

Code: Select all

	on_construct = function(pos)
		minetest.get_node_timer(pos):start(math.random(2400,4800))
	end,
Also, in the trees lua:

Code: Select all

minetest.register_lbm({
	name = "default:convert_saplings_to_node_timer",
	nodenames = {"default:sapling", "default:junglesapling",
			"default:pine_sapling", "default:acacia_sapling",
			"default:aspen_sapling"},
	action = function(pos)
		minetest.get_node_timer(pos):start(math.random(1200, 2400))
	end
})
change those 1200,2400 numbers to a quicker time, play with it and you get good result.

I had to do this on a server.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

maikerumine wrote:Yes, in the nodes lua, change the sapling time to a smaller number.
So it’s not only ridiculous slow but hardcoded, too? :(

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: Is the slow speed of trees to grow on purpose?

by rnd » Post

paramat wrote:
Linuxdirk wrote:
paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why? Is there at least a way to change that (either by configuration or via mods)?
Tree growth is guaranteed within 80 mins, before, some saplings would take longer.
As i wrote, sofar used complex statistical maths to calculate the time range equivalent to the old behaviour, you can study it yourself in the PR thread.
It is equivalent.
As i wrote, it only seems slower because there is a minimum grow time instead of an occasional tree growing almost immediately. 40-80 mins *sounds* too long to me too, but i trust sofar's maths.
Well im not the one to blindly accept the "official reports" so .. challenge accepted.

How do trees grow? Lets examine the code.

Code: Select all

At beginning when sapling placed timer starts ('uniformly' random time between 40 min and 80 minutes):

minetest.register_node("default:sapling", {
	on_timer = default.grow_sapling,
	
	on_construct = function(pos)
		minetest.get_node_timer(pos):start(math.random(2400,4800)) -- RND: 40-80 minutes
	end,
and

And when timer reaches 0 tree attempts to grow:

function default.grow_sapling(pos)
	if not default.can_grow(pos) then-- try a bit later again
		minetest.get_node_timer(pos):start(math.random(240, 600)) -- RND: 6-10 minutes
		return
	end
	
And if we go away and come back later this applies:

minetest.register_lbm({
	name = "default:convert_saplings_to_node_timer",
	nodenames = {"default:sapling", "default:junglesapling",
			"default:pine_sapling", "default:acacia_sapling",
			"default:aspen_sapling"},
	action = function(pos)
		minetest.get_node_timer(pos):start(math.random(1200, 2400)) -- RND: 20-40 minutes! this restarts timer to 0!
		--documentation: start(timeout)`  * start a timer * equivalent to `set(timeout,0)`
	end
})
0. So assume we just plant sapling and stand there until tree grows. If all is correct ( there is valid soil below sapling,
light level at sapling position is at least 13) tree will
simply grow randomly between 40-80 minutes. If not it retries to grow again after 6-10 minutes. Default server night time is 20 minutes = 1200s.
SO - seeing how torch light level is only 12, you obviously need to way for day or use better light source with at least 13( if there is one )

Lets do now this "complex statistical" analysis :

Code: Select all

-- Experimental determine of times when light crosses 13 (needed for tree growth)
-- morning time when you get light above 13: time = 0.244375 * 24000 = 5868 (minetest ingame time span 0-24000)
-- evening time when you no longer get light above 13: time = 0.755666 * 24000 = 18136
-- our time: first time with light 13 marks 0. So evening with light<13 is at (0.755666-0.244375)*2400 = 1227.0

--_G.minetest.set_timeofday(0.75);say(_G.minetest.get_node_light(self.pos()))


experiment = function()
	local t = math.random(2400); -- random initial time of day (in cycle of 20+20=40 minutes)
	t=t + math.random(2400,4800); -- initial time
	local daynight = 2400; -- duration of day night
	local nighttime = 1227;
	
	if  t % daynight< nighttime then -- daytime
		return t,1; -- tree grown
	end
	
	local count = 1;
	while count<1000 and not (t % daynight< nighttime) do -- time is not day, so repeat
		count = count + 1;
		t = t + math.random(240, 600); -- retry with another timer
               -- note: no overflow occurs here since 64 bit double numbers are 1.8*10^19..
	end
	
	return t,count
end

local n = 1000000; -- repeat experiment with 1 million trees
local total = 0;
local data = {};
for i = 1,n do
	local t, count = experiment();
	local k = math.floor(t/1000); -- which 1/10th  of 0-10000 results belong to
	data[k] = (data[k] or 0) + 1;
	total = total + t;
end

for k = 0, 10 do data[k] = 100*(data[k] or 0)/n end
say(" repeat " .. n .. " times. avg time " .. total/n .. " detailed distribution " .. string.gsub(_G.dump(data),"\n",""))
RESULTS:

1. supose we plant tree at random time of day.
we see that average time to grow tree is 5202+1 s ~ 1.44 hours( 1 million trees analysed)
MORE DETAILS: how many % of trees grew in "slots" of 2000-3000,..., 9000-10000 seconds:
3.1%, 9.9%, 23.5%, 50.7% (=5000-6000),0.5%, 12.02%, 0 (= 8000-6000) ,0,0..


So yeah... its more like 83-100 minutes for 50% of trees...

2. suppose we plant tree at beginning of day at first good light
we get 4001+-1 s ~ 1.11 hrs
3. suppose we plant at evening.
5229+-1 s ~ 1.45 hrs

2. Assume we go immediately away so that the block containing sapling unloads and then come back later - so block loads again.
Now we only need to wait randomly between 20-40 minutes! so if you have a good artificial light source available this is superior strategy.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

TBC_x
Member
Posts: 17
Joined: Wed Nov 02, 2011 13:18

Re: Is the slow speed of trees to grow on purpose?

by TBC_x » Post

I think the randomness should be biased and growth time shorter. Or just the latter.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post

Hmm perhaps the light check should be a check for the light in daytime, real plants continue to grow at night. Otherwise anyone using a very slow time speed (like me) will have delayed growth, and everyone will have growth delayed due to night.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Is the slow speed of trees to grow on purpose?

by azekill_DIABLO » Post

Linuxdirk wrote:
paramat wrote:Tree saplings grow in 40-80 mins, bushes half that.
WTF? Sorry, but this is ridiculous. 4 to 8 Minutes would be fine. But up to 80 realtime minutes (or never) for one tree ON PURPOSE? Why? Is there at least a way to change that (either by configuration or via mods)?
that means for someone who plays 10 minutes a day in solo: a full week or even more to get trees?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

azekill_DIABLO wrote:that means for someone who plays 10 minutes a day in solo: a full week or even more to get trees?
I usually plant trees in my tree farm and go to a safe location and leave the game running on another desktop while I do something else for 1-2 hours before coming back (even then most of the trees are not grown).

It's so annoying I want to create a fertilizer mod allowing to grow trees instantly (like Miecraft's bone meal).

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Is the slow speed of trees to grow on purpose?

by azekill_DIABLO » Post

tenplus1 did a good one
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

Re: Is the slow speed of trees to grow on purpose?

by maikerumine » Post

I say halve the time and chive on.
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

azekill_DIABLO wrote:tenplus1 did a good one
Jep, just found it :)

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: Is the slow speed of trees to grow on purpose?

by Chibi ghost » Post

just chopped down all my default trees for the leafs and trunk to make more trees
the cycle never ends

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post

rnd we can certainly consider reducing the nodetimer time, could you look at the old ABM method and try to calculate what would be equivalent using the nodetimer method? The ABM method also relied on light 13 to enable growth.
See the PR thread for sofar's calculations https://github.com/minetest/minetest_game/pull/870

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post

rnd,

> And if we go away and come back later this applies:
minetest.register_lbm({
name = "default:convert_saplings_to_node_timer",

No that's a conversion for old non-timer saplings to add a timer to them, that was only run once per mapblock when a world updated to the timer system. So you can ignore that LBM.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Is the slow speed of trees to grow on purpose?

by paramat » Post


User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: Is the slow speed of trees to grow on purpose?

by Fixer » Post

Saplings should grow much faster now, https://github.com/minetest/minetest_game/pull/1818

User avatar
sorcerykid
Member
Posts: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Is the slow speed of trees to grow on purpose?

by sorcerykid » Post

I remember when the just test server came back online in April, lag was using the latest version of Minetest with the new growth code. At first everybody (myself included) thought the saplings were sterile. A couple of us even broke down into prayer xD.

Image

It was frustrating, to say the least. I only hope that this unbearably slow rate was unintentional. After all, most people don't have hours to idle away while harvesting their tree farms. A moderate 20-30 minutes is more than sufficient.

On a sidenote, I have to wonder how many of the core devs actually play Minetest on a regular basis, because some of the recent updates (in 0.4.15 particularly) just make little sense, at least from a player perspective.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Is the slow speed of trees to grow on purpose?

by Linuxdirk » Post

sorcerykid wrote:On a sidenote, I have to wonder how many of the core devs actually play Minetest on a regular basis, …
None, I guess.

Post Reply

Who is online

Users browsing this forum: Blockhead and 9 guests