• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

navigating creep AI through a maze

Status
Not open for further replies.
Level 23
Joined
Oct 18, 2008
Messages
938
my terrain is a randomly generated maze of fully walled off cells which each get some randomly selected walls removed at game start. here's a picture:

JPGRnq0.jpg


I want my AI to move its units around in a way which respects the nearby walls, not getting stuck in corners or flocking everything through a few chokepoints as would happen if they were told to just automatically path to random far away locations.

ideas?
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
I assume, that there is some kind of grid, the maze is based on. I don't know if you want the AI to move like it knows the shortest path or more like following an algortihm to find the right path at some point. If you want the shortest path, the normal warcraft 3 path finding is your best option I think. Maybe you can use a dummy unit, that is ordered move towards your target point and the AI units are ordered to follow that dummy unit and you manually control them to move in a good way, while you use the dummy unit to find the shortest path.
It's definitely not easy what you are trying to do.
 
Level 11
Joined
Jun 2, 2004
Messages
849
Pathfinding is no simple task. The regular wc3 pathfinding engine should respect your walls provided they're implemented the normal ways (path blocking doodads or buildings), but of course they'll always magically know the shortest path.

It's hard to tell what you actually want help with. We can give you something low level (like an actual A* algorithm that will find the shortest path from node to node) or high level (vague advice on how to use regions or whatever). Do you want the units to walk down the middle of the lanes instead of cutting corners? Do you want them to go from any arbitrary node to any other arbitrary node in a single command, or do you want them to choose a direction every time they enter a new node? etc.
 
Status
Not open for further replies.
Top