Enemy Movement/Patrols and chasing
quinn221
Member Posts: 280
Hey Guys,
I have been searching the forums on enemy movement and patrols. Lots of info, some dating back a few years. Wondering if anyone can tell what the best and mont efficient way to handle enemy moment in the current game salad.
Currently I am using very basic patrols and movement for my RPG ...this is how I am currently do int ( )
However I sometimes run into problem with my enemy getting stuck between walls, trees etc. For some of my enemies this works great, but others not so much.
I guess what I am asking, what is the current best practice to achieve a smooth enemy chase behavior in and RPG game with obstacles.
Comments
Jamie mentioned in the video that it has limitations minute 17:00 , your actor might get stuck and he showed a method to avoid that as much as possible. I think pathfind gives smooth enemy chase im not sure and i dont know how to use it but you will find tutorials and templates i think. This method should work, its easy to do and you can do adjustments to make sure your actors dont get stuck.
Yeah, that tutorial is pretty simple and basic but should work if your map is not too congested with blockage. In it I use circular collision shapes on the scenery items and enemies so they will kind of 'slide' around each other and not get stuck on corners. You might be able to plan your maps so things don't get hung up, it may just take some time to get it right.
If you want more advanced pathfinding you'll probably need to look into the A* pathfinding like @Icebox mentions above.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
This might have some interest:
http://forums.gamesalad.com/discussion/comment/464226/#Comment_464226
@RThurman, that sounds pretty cool. Downloaded to check it out!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@Icebox and @jamie_c I do understand it is basic and has litmations and Jamie I think you are right, I can get it to work if I plan out the maps. I want to find out more about pathfinding, but most of the links I click on are broken. I have been looking for a basic tutorial on it but have not found one yet. A few months back saw one, but now I can't find it
@RThurman is is cool, going to have to look more into it!
@quinn221 -- Yes its pretty fun stuff. You also might want to check out @Socks entry that is just two comments down from mine. He shows some really fun examples.
For me, the idea is to give actors their own personalities, quirks, and habits. Then the user can exploit those subtile quirks to manipulate the outcome of the game. (Or at least to stay alive for a little longer.)
This is what gave Pac-Man its really cool vibe -- even though you were on the edge of panic, if you stayed cool and collected you could exploit the ghost's quirks to live another two minutes.