Difference between globalstep and abm?

Post Reply
User avatar
Milan*
Member
Posts: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

Difference between globalstep and abm?

by Milan* » Post

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
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Difference between globalstep and abm?

by rubenwardy » Post

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
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

Re: Difference between globalstep and abm?

by paramat » Post

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: 255
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant
Location: Germany
Contact:

Re: Difference between globalstep and abm?

by Milan* » Post

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest