Monday, November 5, 2018

path finding - Enemy Movement AI


I have a non-tile-based top down shooter game, and I have enemies set up. However I need the enemies to move to the player. Pathfinding algorithms will mean the enemies will just hug the wall. The map has many walls and objects for cover.



How is it done in other games and what should I do?



Answer



First of all if your map is not tile based, you need to create a navigation mesh out of it.


Second thing you will need is a good pathfinding algorithm. A* is a good one to start with.


Third you will need to add some intelligence to your pathfinding so it will go throught the doors that can be opened and avoid those who can't, I am sure you will find a way.


Fourth, if you want to make your AI look smarter you can smooth their path with some steering algorithm (or you can look at what valve did for left4dead)


And then I guess this would be a good start :)


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...