Per-mod and global ABM limit

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

Per-mod and global ABM limit

by neko259 » Sun Dec 28, 2014 18:05

As my nature mod was very heavy with many of the ABMs on leaves, I introduced a "limited" which disallows my ABMs to be run more than a number of times per time unit. I think this is a useful thing and could be added to minetest engine or at least the ABM API (add some "limit" parameter, that allows mod devs to add their own limit). I think such limit could be configured per server or per mod (if we have some mods that depend on ABMs and will work wrong without them).

I don't know if this is hard to implement, but please consider the idea.
 

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

Re: Per-mod and global ABM limit

by Krock » Sun Dec 28, 2014 19:06

I don't know why that would make sense. The leaves must be removed/updated anyway - somewhen.
Just use a higher "chance" variable to spread the load.
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>
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

Re: Per-mod and global ABM limit

by neko259 » Sun Dec 28, 2014 19:40

Krock wrote:I don't know why that would make sense. The leaves must be removed/updated anyway - somewhen.
Just use a higher "chance" variable to spread the load.

Chance is to limit the "in-game speed". This means if I want the trees to grow slowly, I'll lower the chance. But what if I want them to grow fast, but to limit the server load? Then I set a high chance and a limit. If there is only one player on the server and 1-2 trees, they will grow fast. But if there are 900 trees in the ABM area and 100 players, the overall load will be limited. There can be 2 types of limits: just ignore the action if the load is too high or stack the actions to a queue and pop them later, then the load lowers.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 4 guests

cron