A* Pathfinding Project

How to stitch recast graphs at runtime?


#1

Sorry if this is a duplicate, I couldn’t find any post that seemed to have this exact question.

I’m using DunGen from the asset store, which takes predesigned rooms with predesigned connection points and puts them together at runtime for randomized dungeons.

Since generating a recast graph on the whole level at runtime is slow, can I instead save the recast graph for each room? Then somehow stitch the rooms together so the AI would not be limited to a single room?


#2

Hi

This is technically possible if all rooms are square, the same size, and no two are in the same XZ cell but on different y coordinates (multiple floors). Then it is possible with code to replace individual tiles, however it does require a bit of code. In fact this was done in the game Folk Tale (http://gamesfoundry.com/).

As an easier solution, is it not possible to use a (layered?) grid graph instead? They are much faster to scan.