Pre Pro Purchase Questions

Hi,

I was not able to find a support contact email for pre purchase questions, so I hope it is ok to post on the forums.

I have been using unity navmesh but thinking of moving to a grid based pathfinding solution. A* Pro seems like it might be a good solution for me.

  1. My game is a turn based strategy (xcom/jagged alliance style). One problem I have with navmesh, is that I would like to constantly calculate the path as my mouse hovers over the location. I would like to do this, so I can display the amount of action points (ie the distance), it would take to make a move for the agent. Therefore the player could move the mouse around and decide if they want to make the move (when seeing how much it would cost them).

However, it doesnt seem that navmesh is up to the task. It takes to long to make each possible calculation as I old my mouse over each location.

Would A* be able to handle such a situation? (I am only moving a single agent at a time).

  1. I would like to be able to draw a line rendered in real time to the destination. (So the player can see the agent path). Again, this is possible with navmesh via c#, but not in real time (per problem 1). Would A* be able to support this?

Thank you for your time!

Hi

These forums are what I prefer for any type of questions. By using forums instead of emails other people can look at the existing threads which means they can often find an answer to a question they had much faster.

1). That should work well.
In the pro version there is an example scene called ‘Path Types’ which shows how you can do this. You can see it in the video here: https://youtu.be/hmx1sx6ezQA?t=1m (at the one minute mark). This is done using the ConstantPath type.
There is also an example scene called ‘Turn Based’ which shows some simple turn based movement in a hexagonal graph. This is probably the example scene that you should look at the most.

Normally pathfinding requests are asynchronous (which is usually fast enough), however if desired you can block until they have been calculated by using

// Path is not calculated here
path.BlockUntilCalculated();
// Path is calculated here
  1. How you do the line drawing is up to your scripts to decide. You will get a list of Vector3s that you can use to draw it.
    The ‘Path Types’ demo shows a very simple way to do this using a LineRenderer component, but depending on the game you may want something more polished. You can see this in the video here https://youtu.be/hmx1sx6ezQA?t=32s (at the 32 second mark).

Hi Aron,

Thank you for taking the time to reply. I will most likely get the Pro version.

Does there still seem to be a desire for playmaker actions for A*? I see there is an older depreciated package here: https://github.com/grofit/playmaker-astar-actions

If I use A*, I will likely do so with Playmaker. I wrote the custom actions VRTK asset (toolkit for VR), Beautify, VRweapons, Xweapon trails, liquid volume, outline effects and a few more. If I do write them, I will release them under MIT/LGPL. Howvever I am just a beginner in C#, so they will likely be pretty basic actions :slight_smile: The past ones look pretty well done!

Regarding the playmaker side of things, I am familiar with what has changed since they were written 4 years ago. How much has changed on the A* side? Is this a completely different version that 2013/2014?

Thanks again,

Eric

Seems like support ended around version 3.4?

Hi

There are a few that have requested it. I haven’t had time to write any myself unfortunately.
Behavior Designer has an integration for my package however and I know that is up to date and working.

The overall interface and structure is similar, but there have been A LOT of changes since then.
The code quality has improved significantly and there are a lot more features.
You can take a look at the changelog here: https://arongranberg.com/astar/docs/changelog.php

Cool. I see a later version that someone wrote for 3.4 https://bitbucket.org/grofit/astar-playmaker-actions/src

I do have behavior designer, as well as third person controller (which is why I was thinking A* might be a good choice for me). So I can have a look at what they have implemented as well (even if its a bit dated).