Noob question on mob AI

Posted:
Tue Sep 27, 2016 02:44
by miner8
Hey guys, is it possible to implement some sort of path finding algorithm for mobs via mods without tinkering the core of the game (minetest)?
Re: Noob question on mob AI

Posted:
Tue Sep 27, 2016 03:54
by BrandonReese
You could write it in lua but there are already some path finding algorithms in the core already.
https://github.com/minetest/minetest/bl ... .txt#L2238
Re: Noob question on mob AI

Posted:
Tue Sep 27, 2016 04:31
by miner8
Neat. Assuming it's using A*, does this mean mobs can navigate simple obstacle rather than using direct line of sight?
For the example below, the mob in position S will move around the Os (obstacles) to get to T (player's position).
O = obstacle
S = Source (mob's position)
T = Target (player's position)
X = walk-able path
X X S X X
X O O O X
X X T X X
The reason I'm asking is because I tried some of the mobs and they seem to move by direct line of sight. Getting behind a simple 3x3 block of wall will hinder the mob from getting to me. If the block is anything less than 3 blocks high, they can simply jump over it.