Heres the map - Theres 16 large bases in a big square,. Every X seconds, zerg spawn on the outside of the square in a rim. The zerg are sent to the bases which have choke holes. Does anyone have a good pathing algorithm? My current is making all of the regions (bases) in an array and ordering the units to attack-move to the center of the base, but that will pose problems.
I guess it depends on what your trying to do and the problems your having with your current solution. You can either make it by trigger or use AI (I have no idea how to use AI).
I guess it depends on what your trying to do and the problems your having with your current solution. You can either make it by trigger or use AI (I have no idea how to use AI).
The edge is where the mobs spwan and the center is where you base. I want them to come into the bases.
My main problem is, if the angle is correct, the mobs will just bar up on the wall. Also, i need some way to hunt loners because it only goes on what bases are claimed, but players can just go into no base
There is an algorithm called A* which is the goto for pretty much any pathing needs in a game. It's basically a depth first search that attemps to follow a direction- it wont return the most optimal distance. Then you have Dijkstra's Algorithm which will find the best answer every time but is not practical to use in a real time setting.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Anyone got some? lol
Heres the map - Theres 16 large bases in a big square,. Every X seconds, zerg spawn on the outside of the square in a rim. The zerg are sent to the bases which have choke holes. Does anyone have a good pathing algorithm? My current is making all of the regions (bases) in an array and ordering the units to attack-move to the center of the base, but that will pose problems.
I guess it depends on what your trying to do and the problems your having with your current solution. You can either make it by trigger or use AI (I have no idea how to use AI).
draw a picture what you want. I dont get it
Neither do I. xD
see attach. (idk how to put them in a post)
The edge is where the mobs spwan and the center is where you base. I want them to come into the bases.
My main problem is, if the angle is correct, the mobs will just bar up on the wall. Also, i need some way to hunt loners because it only goes on what bases are claimed, but players can just go into no base
There is an algorithm called A* which is the goto for pretty much any pathing needs in a game. It's basically a depth first search that attemps to follow a direction- it wont return the most optimal distance. Then you have Dijkstra's Algorithm which will find the best answer every time but is not practical to use in a real time setting.