Can A* do the following?

Hello to everyone on the forums. Before I jump from the free version to the pro version, I’d like to ask :

  1. Is it possible to create procedural levels, then apply the A* pahtfinding to them ? How about extending these levels and adding the area to the pathfinding again (to the already scanned area) ?

  2. Can I create weights on the terrain ? for example, adding swamp on certain parts of the terrain, certain units will go faster through the swamp than others. ( I know this is possible for Unity 3, but does it work in Unity 5.1+ ? ).

  3. I understand that Local Avoidance has been written, that’s nice, however, in case of dynamically moving objects, or in the case of opponent’s units blocking an entrance, will the pathfinding adapt a new path ?
    -= to clarify : if the enemy base has two entrances, and the nearest one suddenly gets blocked by soldiers, will my unit find the other entrance ? =-

  4. Can a unit(seeker) be surrounded by other units(seekers), and thus - blocked/unable to move ? For example, if I’d have 4 units surrounding one ( they’d for a + as a shape), if the one in the center was of a different allegiance, would it still be able to move out ?

Many thanks ! and thanks to Aron for creating this tool.

Hi

Yes it is possible to calculate the graph during runtime (that is also possible in the free version).
You can recalculate parts of the graph during runtime (however with a performance hit when you do that). See http://arongranberg.com/astar/docs/graph-updates.php

  1. Yes. That is possible. The grid graph can for example take a texture and apply weights based on that (texture thing is pro version only, but it is possible to do it using e.g GraphUpdateScene components in the free version, see link above).
    See http://arongranberg.com/astar/docs/class_pathfinding_1_1_grid_graph.php#ac855bb1ba0ecd663efca9bda41527a6c

  2. No. The local avoidance only takes into account very local information and tries to find a local minima. It does not care much about the globally best path. However see my latest experiments with cooperative pathfinding: http://arongranberg.com/2015/06/cooperative-pathfinding-experiments/

  3. For the same reasons as 3. It would get a path from the pathfinding system and try to move out. If the characters that surround it respect the character in the middle (e.g are friends), they will likely move away to let the character in the middle move out, but otherwise the character in the middle will be stuck. See also cooperative pathfinding experiments.

1 Like

Thanks for the info Aron ! I purchased the Pro version and will post further questions on the forums.

I have a few more questions if that’s alright :

5 . What method should I use for using RVO and multiple units of different speeds ? this goes for a strategy game where you control multiple units of different types.

6 . In a short while I’ll be working on a strategy game and I’ll use your library intensively. I’d like to ask if it’d be alright to create a thread specifically for my game, or should I keep everything spread, since I’ll be asking a ton of questions.

Hi

  1. RVO supports units with different speeds out of the box. Though it does work best if they have approximately the same speed.

  2. I think it is better to create multiple threads as that helps other users to find threads related to problems that they are having more easily.