[AI] chasing an enemy

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
dragonblood
Halfling
Posts: 68
Joined: Sat Apr 25, 2015 4:01 pm
x 6

[AI] chasing an enemy

Post by dragonblood »

Hi,

I'm wondering how to make an enemy chasing the player. First, I thought that i will use pathfinding A-Star code like MicroPather for that but I think it is too heavy for the CPU. I think that pathfinding A-Star is good to escape a maze which it is static but i don't think it is good to chasing a player who is moving. So what is the good method ?

Sorry for my english

thanks
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Re: [AI] chasing an enemy

Post by mkultra333 »

On a modern computer you shouldn't have problems with A* or pathfinding in general. Recast/Detour is a good library, I've been using it for years and there's a few posts on this site about using it, though they'll be a bit old.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
dragonblood
Halfling
Posts: 68
Joined: Sat Apr 25, 2015 4:01 pm
x 6

Re: [AI] chasing an enemy

Post by dragonblood »

mkultra333 wrote:On a modern computer you shouldn't have problems with A* or pathfinding in general. Recast/Detour is a good library, I've been using it for years and there's a few posts on this site about using it, though they'll be a bit old.
Yes but when I use MicroPather on a heightmap 6000*6000, calculate the solver became too heavy for the cpu. I will try recast/detour to compare with MicroPather.
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 116

Re: [AI] chasing an enemy

Post by mkultra333 »

No doubt it depends on how well the pathfinder can simplify the geometry. Recast does a good job of creating a simplified navigation mesh.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.