I'd say avoid narrow passes. Regardless of the quality of pathfinding you can only fit a certain number of units per second through any specific gap which means any excess units have to queue behind which leads to them turning around to find a new route and bouncing off other units. It's even worse if friendly units are trying to enter the gap from both sides. Since there is no code to say "stand aside and let the larger group pass" it means a single unit can block an entire army. You'd also want to avoid crossroads where columns of friendly units would regularly cross paths. Once again the code does not allow either group to wait for the other so the result is the groups entangle in the intersection.
Having said that, there are features in the engine like "heatmapping" which provide hints as to whether an area is "busy". Still, I wouldn't rely on that (especially since it can be turned off).
Another thing I have learned is that however realistic adding some perlin noise to your "flat" areas is, it ruins pathing majorly. Try to keep all playable surfaces free of any high or mid frequency noise. A trick you can do is have 2 heightmaps, one that you use to render the texture (this can have all the noise you want) and one that is the ingame heightmap (strictly smooth surfaces).
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
ingame select a unit and press F2. (i think first you have to type /cheat /globallos to see whole map) Ideally passable (green) and unpassable areas (red) have clear borders. If there are stray, noisy red fields or narrow green fields, pathing will become more problematic.
There is Lua pathfinding ofc, but in general I would say it is too slow. In the future we may have different engine-side pathfinders to choose from, because the interface is now clean enough to allow that.
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum