World not living when not in game

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

World not living when not in game

by Marshall_maz » Sun Jul 20, 2014 10:10

Hi guys , I have a problem that I don't even know what to call in the topic.

I have a 0.4.10 server at home. The server is always on.
I connect to it with my player over the lan.

My problem is , even with the server permanently on , the world only lives when I am connected with my player.
For example , plants I plant will not grow unless I go and stand close to them. Even if I am in the game but far away
from the plants they just come to a standstill and don't grow further.
The same for example with my solar batteries. If I am not standing close to them they do not charge. Even if it is day
they will stay depleted until I go and stand next to them. And so it goes for everything in the game that is "alive".
Nothing happens unless I go and stand close to it , even though it's on a server that is permanently on.
This is very annoying , when I use things that must recharge or harvest plants I always have to stay there for a long time for it to recharge or grow again. It doesn't grow and "live" on it's own like it's suppose to.

I noticed this only recently. Previously the world evolved and lived on it's own on the same server. Maybe the update to 0.4.10 caused this ?

Anybody else have this problem and know how to solve it that the world "lives" on it's own like it's suppose to ?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: World not living when not in game

by Krock » Sun Jul 20, 2014 10:51

There are parts of the world, which load and unload when a player comes in it and leaves - it's required to get free memory and less CPU usage at serverside.
There are some configurations to extend the "wait for unload" time.
As example: (in seconds)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
server_unload_unused_data_timeout = 29
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Sun Jul 20, 2014 11:02

Krock wrote:There are parts of the world, which load and unload when a player comes in it and leaves - it's required to get free memory and less CPU usage at serverside.
There are some configurations to extend the "wait for unload" time.
As example: (in seconds)
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
server_unload_unused_data_timeout = 29


That's in minetest.conf yes ?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: World not living when not in game

by Krock » Sun Jul 20, 2014 11:05

Marshall_maz wrote:That's in minetest.conf yes ?

Yes. See minetest.conf.example for more settings.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Sun Jul 20, 2014 11:07

Krock wrote:
Marshall_maz wrote:That's in minetest.conf yes ?

Yes. See minetest.conf.example for more settings.


I don't have a .example file , where do I find that please ?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: World not living when not in game

by Krock » Sun Jul 20, 2014 11:08

Marshall_maz wrote:I don't have a .example file , where do I find that please ?

https://github.com/minetest/minetest/bl ... nf.example
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Sun Jul 20, 2014 11:11

Krock wrote:
Marshall_maz wrote:I don't have a .example file , where do I find that please ?

https://github.com/minetest/minetest/bl ... nf.example


Thank you
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: World not living when not in game

by paramat » Sun Jul 20, 2014 15:26

Yes this is intentional and not a bug, it's not something that started with 0.4.10. The world is only active within a certain range of a player, this is to reduce processing load, for example if ABMs were running on an entire world of nodes the game would be unplayably slow. However that range from a player is changeable in the minetest.conf, so you can increase it as much as you want and balance it against processing load:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
# how large area of blocks are subject to the active block stuff (active = objects are loaded and ABMs run)
#active_block_range = 2

Block = mapblock = 16 nodes.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: World not living when not in game

by prestidigitator » Sun Jul 20, 2014 18:42

I wonder. Does the new force-load feature (minetest.forceload_block) keep things updating when there are no players connected, or does it just guarantee nodes can be read when ABMs and timers and stuff DO run?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: World not living when not in game

by sfan5 » Mon Jul 21, 2014 06:55

prestidigitator wrote:I wonder. Does the new force-load feature (minetest.forceload_block) keep things updating when there are no players connected, or does it just guarantee nodes can be read when ABMs and timers and stuff DO run?

I'm pretty sure forceloaded blocks act like blocks with players in them.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

Re: World not living when not in game

by aldobr » Fri Jul 25, 2014 12:55

And the ABMs wont trigger if someone is not looking at them, right ?
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: World not living when not in game

by Kilarin » Fri Jul 25, 2014 16:04

sfan5 wrote:I'm pretty sure forceloaded blocks act like blocks with players in them.

So, would it be possible to create a node that could be placed that did a periodic forceload for an area around itself and kept it perpetually active?

It would have to be expensive, but would be very valuable to gardeners.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: World not living when not in game

by rubenwardy » Fri Jul 25, 2014 17:24

 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: World not living when not in game

by Kilarin » Fri Jul 25, 2014 17:51

rubenwardy wrote:It would be possible.

Cool! I may have to play with that! Unless someone who has more time and skills gets to it first.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: World not living when not in game

by prestidigitator » Sun Jul 27, 2014 02:11

Kilarin wrote:
sfan5 wrote:I'm pretty sure forceloaded blocks act like blocks with players in them.

So, would it be possible to create a node that could be placed that did a periodic forceload for an area around itself and kept it perpetually active?

You don't have to call it repeatedly. Once it is in the "forceload" list Iit stays there, even if the server is restarted. You have to explicitly remove it from the list again to get it to unload. See minetest.forceload_free_block. There is a (configurable) maximum number of blocks that can be on the forceload list, but continually adding a block to the list to compete with other things on the server over what ACTUALLY gets kept in memory is probably the wrong way to approach it.
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: World not living when not in game

by Kilarin » Sun Jul 27, 2014 13:40

prestidigitator wrote:continually adding a block to the list to compete with other things on the server over what ACTUALLY gets kept in memory is probably the wrong way to approach it.

yeah. And while I would LOVE to be able to lock a garden in to place so it keeps growing, I'm afraid a device that did this would cause all kinds of trouble in the long run.
 

prestidigitator
Member
 
Posts: 632
Joined: Thu Feb 21, 2013 23:54

Re: World not living when not in game

by prestidigitator » Mon Jul 28, 2014 07:37

Kilarin wrote:
prestidigitator wrote:continually adding a block to the list to compete with other things on the server over what ACTUALLY gets kept in memory is probably the wrong way to approach it.

yeah. And while I would LOVE to be able to lock a garden in to place so it keeps growing, I'm afraid a device that did this would cause all kinds of trouble in the long run.

I don't think it's that bad of an idea to lock the garden in place. It's just something that should probably be decided from the perspective of server management. If the garden is important enough to devote constant server resources to it, that's fine. But to make that decision you have to consider the big picture, so to speak. Managing authorization would be a little easier with a simple configuration file, although it might not rival block placement for ease of use.
 

thetoon
Member
 
Posts: 106
Joined: Tue Dec 11, 2012 12:55

Re: World not living when not in game

by thetoon » Mon Jul 28, 2014 09:21

I might be stating the obvious here, but I do think part of the solution lies in how the mods are implemented (providing the API allows it, but if not it should be a welcome addition).

Whenever a mod's effects depends on elapsed time, one should really express it as a function of a variable time (dt), rather than a fixed "step". Let's say you have a "pear" node that goes through the following states : blossom, flower, old-flower, green-fruit, ripe-fruit at a rate of one new state every ten minutes. Then, after twenty minutes in the last state, it disappears ("rot"). Keeping the block loaded for every "pear" node to be continuously updated is a waste of CPU cycles. Instead, we could just store the last time the node was "unloaded" in the block (maybe it's already there), compute a timedelta upon re-loading, and act accordingly.

I'm really not sure ABMs allow this, but it would be much more efficient.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: World not living when not in game

by sfan5 » Mon Jul 28, 2014 09:27

ABMs do not allow that, but this can already be done (using the current mod api).
Seems like nobody is doing that yet
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: World not living when not in game

by rubenwardy » Mon Jul 28, 2014 10:10

It is just lazy coding.
 

Kilarin
Member
 
Posts: 649
Joined: Mon Mar 10, 2014 00:36

Re: World not living when not in game

by Kilarin » Mon Jul 28, 2014 12:04

TheToon wrote:Whenever a mod's effects depends on elapsed time, one should really express it as a function of a variable time (dt), rather than a fixed "step". Let's say you have a "pear" node that goes through the following states : blossom, flower, old-flower, green-fruit, ripe-fruit at a rate of one new state every ten minutes. Then, after twenty minutes in the last state, it disappears ("rot"). Keeping the block loaded for every "pear" node to be continuously updated is a waste of CPU cycles. Instead, we could just store the last time the node was "unloaded" in the block (maybe it's already there), compute a timedelta upon re-loading, and act accordingly.

I was JUST getting on to suggest, "You know, if we just kept track of the time a node had been unloaded, then when it was loaded again, it could adjust accordingly..."
I don't think it would work as well for plants spreading, but it would certainly work for plants growing.
 

thetoon
Member
 
Posts: 106
Joined: Tue Dec 11, 2012 12:55

Re: World not living when not in game

by thetoon » Mon Jul 28, 2014 12:56

Kilarin wrote:
TheToon wrote:I don't think it would work as well for plants spreading, but it would certainly work for plants growing.


As long as we don't use this for cross-block growind/spreading, it should be fine. Of course, you probably don't want to handle infinitely-growing trees with such a mechanism.
 

ThatGraemeGuy
Member
 
Posts: 126
Joined: Thu Jul 31, 2014 11:02
GitHub: thatgraemeguy
IRC: ThatGraemeGuy
In-game: thatgraemeguy

Re: World not living when not in game

by ThatGraemeGuy » Fri Sep 05, 2014 07:02

I came across this post, just thought I'd point out that technic recently added a "world anchor" which allows you to configure a number of blocks that will be forceloaded. These areas then act exactly as if a player where standing there.

I have been using this successfully to run unattended quarry operations and automated processing of the resulting metals, etc.

Its probably not practical to have a lot of these on a very busy server, but on ours where there are just a handful of us and I've set the maximum force-loaded blocks to 1,000, I have seen no significant load or memory usage issues.

https://github.com/minetest-technic/tec ... rld-anchor
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Fri Sep 05, 2014 07:37

Graeme I have noticed this last night and tested it. But it doesn't work for me for my electrical systems.
I set an anchor right next door to my electric network room. Added a bunch of stuff in a chest to furnace setup. Left for a while , came back and nothing happened. I tried this about 3 times. The network only works when I am in the room as usually. This anchor is either not compatible with a pipeworks-technic setup , or I didn't set it wide enough. ( I set mine at 8 blocks which should be pretty wide if 1 block is 16*16*16 nodes ) All the farming stuff and plants worked where the anchor is , just not the technic pipeworks network. Do you have pipeworks on the network that works successfully for you with an anchor ?

EDIT: I think I have set it to low at 8. I though 8 meant 8 blocks. But after reading this part of the manual again " The radius can be set as low as 0, meaning that the anchor only tries to keep itself loaded, or as high as 255, meaning that it will operate on a 511×511×511 cube. " I realize that value is not blocks , but radius. So my value of 8 would mean only 16*16*16 if I understand it correctly ? So I think that put the electric network just out of reach. Increased that radius and will see what happens now and give feedback.
 

ThatGraemeGuy
Member
 
Posts: 126
Joined: Thu Jul 31, 2014 11:02
GitHub: thatgraemeguy
IRC: ThatGraemeGuy
In-game: thatgraemeguy

Re: World not living when not in game

by ThatGraemeGuy » Fri Sep 05, 2014 08:53

Yes the radius confused me at first as well, it's the number of nodes, not mapblocks. Made all the more confusing by the formspec telling you how many blocks are being loaded.

The anchor doesn't need to be compatible with specific mods, it works by telling the engine to forcefully load a specific list of mapblocks. Being part of technic, which depends on pipeworks, it would be a bit silly if it were somehow not able to work the the items from those mods.

My setup is this:
    One or more quarries running at around -250
    Each quarry has a sorting tube that puts cobble into 3 chests right next to it, and teleports everything else to a chest at my home
    Each quarry has a radius 5 anchor that keeps enough blocks loaded to ensure that the quarry and attached tubes keep working
    At home, I have an anchor with a pretty large radius that ensures all my stuff keeps processing while I'm gone. This includes the receiving teleport tube, several injector/blinky setups that take various things and move some to a tube sorting system, which in turn moves stuff to storage chests or grinders or furnaces, etc etc.

Just 1 thing to be aware of when using the anchors is that the default maximum number of force-loaded blocks is only 16. You can see that you have exceeded the limit if you have an anchor that says something like "keeping 4/8 blocks loaded". It wants to load 8 but can only manage 4 before the limit stops it loading more. My anchor at home alone is forceloading 64 blocks, so you will definitely want to tweak this. The minetest.conf setting is "max_forceloaded_blocks = N". I have set this to 1,000. My own anchors are forceloading around 200 blocks at any given time, and I've given a few other players anchors too. According to my monitoring the server as a whole is not even using 400MB of memory, so it's not a massive resource hog.
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Fri Sep 05, 2014 09:22

Ok I can confirm that my anchor is working now. It was indeed my setting of 8 that was too low.
Like you say Graeme , it was the setting that is nodes not blocks that caused my confusion and problem.
Increased my radius setting to 60 and now everything runs when I'm gone.
( going to up that a little more as I am also not seeing any mayor difference on my server resource or lag wise )
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Sat Sep 06, 2014 12:07

I found a problem in the admin anchor mod.

When the server has been restarted for backups or updates or whatever reason , then the anchors does not work anymore. You have to visit each one and disable and enable them again for them to start working again.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: World not living when not in game

by rubenwardy » Sat Sep 06, 2014 16:04

That is an engine bug. my anchor mod doesn't have this issue, however mine requires you to place anchors in intervals of 15 blocks (all anchors have a radius of 16)
 

Marshall_maz
Member
 
Posts: 240
Joined: Mon Jul 14, 2014 17:13
In-game: Mazal

Re: World not living when not in game

by Marshall_maz » Tue Feb 10, 2015 15:06

Does anybody know how to get technic's admin anchor to automatically load upon server restart ? Apparently the bug has been fixed , but my anchors still doesn't load upon server start. It only loads some mobs , but none of the actual blocks like technic sorting networks , messecons networks etc.

I have tried using the latest 0.4.11 dev , tried removing the anchors and replacing them , tried placing them with different user , tried placing them with server user.

None of that works. The anchors doesn't load upon server startup.
Anybody know what the trick is to get it to work ?

EDIT: Problem resolved by est31 on irc. Thank you !!
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 22 guests

cron