Works with Dungeon Architect?

Does A* Pathfinding Project work with Dungeon Architect? Dungeon Architect is a procedural dungeon generator, and I’m wondering if anyone has any experience working with procedural levels and A* Pathfinding Project.

Detailing any experience with DunGen might also be helpful as well. Can this tool work with randomly generated levels? Is it possible for the AI to move “across” pieces/tiles?

Hi

I have not used DunGen myself, however if it is simply generating a level it should be possible to just scan it like a normal world.

All graphs can be recaculated during runtime using

 AstarPath.active.Scan();

See also https://arongranberg.com/astar/docs/graph-updates.php

1 Like

Recast graph scanning doesn’t seem to work correctly with the asset package I’m currently using (Multistory Dungeons).

If I build a Navmesh for each “piece” of the randomly generated map, will the A* AI know how to move from one “tile” to another? Or does a “built” Navmesh HAVE to be completely static? (Meaning, the NavMesh itself has to be already built for an ENTIRE map).

Hi

Yes the navmesh has to be constructed for the whole world at the same time.
The package has support for tiles and it is possible to swap them out during runtime so that they are properly connected to each other (this is used internally for e.g navmesh cutting). However it is not as easy to configure as just scanning the graph. It requires some scripting.

Note that navmeshes can be calculated during runtime. So you can call the above Scan function (or possibly the ScanAsync method to avoid freezing the game during the scan) after your random level has been generated.

Maybe you want to try a layered grid graph instead? It might be faster to scan. The quality might be lower though.

It turns out that we needed to adjust various settings on the recast graph scanner, and it fixed a lot of our navigation issues.

Either way, this is super useful information. Thanks!