Graph Updates and Tagging

Hello World!

I’ve been working on some stuff recently for the upcoming A* Pathfinding Project 3.1 release. Many of you have probably been a bit annoyed by the amount of work needed to change tiny details in the graph, for example making some nodes unwalkable. Well, that problem is soon over.
I have created a new script which is called GraphUpdateScene. It collects a number of useful changes you might want to do to a graph such as, as mentioned before, making some nodes unwalkable, or perhaps adding a high penalty to an area (making the area harder to traverse, so units will avoid it).
You can even set the tags of the nodes, which is another new feature I have developed. It is used to define which units can walk on what ground.
Imagine for example that you have some critters, a player and some AIs in your world. Both the AIs and the critters pathfind randomly around in the world but you wouldn’t want the critters to enter houses (they make such a mess). Then tagging is a great way to solve it. If you tag all indoor areas with a tag named for example “Indoors” and make sure no critters can walk on those nodes, that would be it!
Oh, and did I mention that you are no longer restricted to axis-aligned rectangular areas, you can use any polygon shape you want!

Anyway, it’s tedious to describe stuff using text, so here’s a video for you showing both of these features:

15 comments

  1. Hyunil Kim says:

    Hi Aron,

    Just wondering… At 00:45 into the video clip, you create polygon shape. How exactly do you do this? I am completely blocked.

    Thanks!

    • Aron Granberg says:

      Are you sure you are using version 3.1 of the system? Those are the beta docs. 3.1 has just recently been released. And the GraphUpdateScene component did not exist prior to version 3.1.
      The 3.1 version hasn’t even been published in the AssetStore yet (pending).
      If you have bought the pro version on this website, you can use the download link in the confirmation email from when you bought it to download the updated version.

      • jfile says:

        D’Oh! yes, you’re right. We’re using 3.0.9. We probably don’t want to upgrade just yet since WillBlockPath doesn’t work in 3.1. However, we’re looking forward to using UpdateGraphsNoBlock in the new GraphUpdateUtilities script! 😀

        • Aron Granberg says:

          Fixed in an update about 30 seconds ago 😀
          (version 3.1.1 was just uploaded to the server)

        • Aron Granberg says:

          However there is a known bug that it does not work with erosion in grid graphs at the moment (can produce weird artifacts). But well, erosion didn’t work at all with graph updates before 3.1 so I guess that’s alright.

  2. pierce says:

    Hi Aron,

    Amazing work! I know I want to buy the Pro version, but I was wondering if I should wait till after the 3.1 update. Or does anyone who owns pro also receive the update?

  3. Kararan says:

    Looks great… Now I’m developing RTS game which will definitely use tagging concept for land and flying units. Thumps up for you.

Comments are closed.