Noob question on mob AI

miner8
New member
 
Posts: 8
Joined: Tue Aug 30, 2016 10:54

Noob question on mob AI

by miner8 » Tue Sep 27, 2016 02:44

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)?
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

Re: Noob question on mob AI

by BrandonReese » Tue Sep 27, 2016 03:54

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
 

miner8
New member
 
Posts: 8
Joined: Tue Aug 30, 2016 10:54

Re: Noob question on mob AI

by miner8 » Tue Sep 27, 2016 04:31

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.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron