Is the slow speed of trees to grow on purpose?

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

Is the slow speed of trees to grow on purpose?

by Linuxdirk » Tue Jun 06, 2017 07:42

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: 3767
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Tue Jun 06, 2017 13:59

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.
 

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

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

by Chibi ghost » Tue Jun 06, 2017 14:32

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

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

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

by paramat » Fri Jun 09, 2017 19:08

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: 1968
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

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

by Linuxdirk » Fri Jun 09, 2017 21:21

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)?
 

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

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

by Chibi ghost » Sat Jun 10, 2017 06:35

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: 144
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK

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

by PEAK » Sat Jun 10, 2017 19:38

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: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Sat Jun 10, 2017 23:55

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: 1348
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 » Sun Jun 11, 2017 02:39

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.
 

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

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

by Linuxdirk » Sun Jun 11, 2017 07:28

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 » Sun Jun 11, 2017 11:36

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.
If you want to tell people the truth, make them laugh, otherwise they'll kill you. Oscar Wilde
 

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 » Tue Jun 20, 2017 11:21

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

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

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

by paramat » Wed Jun 21, 2017 22:13

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: 7472
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

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

by azekill_DIABLO » Fri Jun 23, 2017 14:20

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?
 

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

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

by Linuxdirk » Fri Jun 23, 2017 14:58

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: 7472
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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

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

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

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

by Chibi ghost » Sat Jun 24, 2017 10:15

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: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Mon Jun 26, 2017 04:06

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: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

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

by paramat » Mon Jul 03, 2017 15:43

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: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat
 

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

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

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

by sorcerykid » Mon Oct 30, 2017 22:05

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: 1968
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

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

by Linuxdirk » Mon Oct 30, 2017 22:10

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.
 

Next

Return to Problems



Who is online

Users browsing this forum: No registered users and 1 guest