Difference between globalstep and abm?

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Difference between globalstep and abm?

by Milan* » Fri Dec 23, 2016 12:08

Hi there,

as i read, adm's can cause perfomance trouble for the game - now i read about globalstep.
I am wondering what the differences are exactly between them and if globalstep is faster than abm.
 

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

Re: Difference between globalstep and abm?

by rubenwardy » Fri Dec 23, 2016 13:41

ABMs are run ON nodes. So they may be called multiple times per tick if you have multiple nodes matching the query.

Global steps run ONCE a tick - a tick is a step. So the function runs once every global server step.

Minetest.after is recommended if you want to run a function at intervals that isn't every server step

Timers run ON a single node's position
 

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

Re: Difference between globalstep and abm?

by paramat » Sat Dec 24, 2016 09:45

The speed depends on the actions triggered.
ABMs only run within 3 mapblocks (48 nodes) of players.
The globalstep is 10-20 times per second.
 

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Re: Difference between globalstep and abm?

by Milan* » Mon Dec 26, 2016 16:40

Thank you both, i think it helped me to understand :)
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 50 guests

cron