Hello! Thanks for the plugin. I am at a point in my game where I am now using Dungeon Architect to generate prefabs in a grid. The prefabs are 1x1 or 1x2 2x2 4x4 all combinations of 1x1 and are stitched together in a large grid to make up a level.
I have a RVO Simulator / A Pathfinder Script with a Recast Graph (800 x 16 x 800)
Currently I am building the dungeon real time and then using a callback on dungeon complete. I am calling
pathfinder.scan();
pathfinder is just my Gameobject with the Pathfinder script on it and I have a recast graph with bounds pre-setup with something like… 800 x 16 x 800. The center point of my dungeon is 0,0,0 but it can go out in any direction 400 units… so I am stuck with a large bounds and only 1/4th of the bounds ever being used, depending on which direction the generator decides to spool out my level…
So a few questions…
- Should I attempt to get the dimensions of my generated level, and use that as the bounds… would that be better than just a static 800 x 16 x 800 or does it not matter if 3/4 of that bounds is totally empty, will that make the performance difference negligible? or would it be in my best interest to try to clamp the bounds down as best as possible rather than a really large safe area?
EDIT: - ok i found this already and Question 1 is answered! Sweet!
if (AstarPath.active != null)
{
AstarPath.active.data.recastGraph.SnapForceBoundsToScene();
AstarPath.active.data.recastGraph.forcedBoundsCenter.y = 0;
AstarPath.active.Scan();
}
So question 2 would be… should I use grid graphs over recast?
If i am using NavMeshCut on a pair of sliding doors would that mean i have to use recast? or would I be able to use grid as well and that doesn’t matter?
If i used grid graphs and I had 10 prefabs all 1x1 squares, should I be generating the dungeon. on callback of dungeon complete → finding the bounds, setting up a grid graph, then scanning during runtime? or should I be scanning individual grid graphs for each prefab before generation and somehow saving them? caching them? stitching them? any type of ‘advice’ or direction on what concepts I should be doing I will try to go that way…
Thanks!
just a pic to show the square pieces 1 unit each. and some are squares, some are T, some are L shaped (but all 64x64 units) 1U prefabs. I scanned the first one with a grid graph just to test.