I’ve been using point graphs for my game since I have player placed objects and destructible environments. This works pretty well so far, but I have some questions about how to approach a few features I will need soon.
Currently I’ve got one enormous Point Graph that generates around the player as terrain pops in and out around them (outside of the camera). This eventually results in an enormous (disabled) grid of nodes which will just about crash unity if I accidentally turn on debug rendering of nodes. Is there any way to clean up these faraway nodes?
Next issue, I’ve got large monsters in the game which should not be able to walk through doors (and maybe no narrow passages?), is there any way to disable them from attempting to do so? Or at least prioritise paths which do not take them through doors? I’ve also got semi-passable windows, and while I want some enemies (zombies) to prefer windows, the more humanlike characters should generally prefer doors unless they are in danger.
Finally, I was pondering implementing vehicles in the game. I figure their driving would just be a separate set of point-graphs that goes along the roads (in a specific direction, of course). However if something is blocking the road then it would make sense for them to try to circle the obstacle, possibly by driving onto the regular point-graph for pedestrians. Perhaps I could add some sort of “width” value to each point node to tell vehicles (and huge enemies) how much space there is on the sides of that node, and force them to use those?
Any thoughts on how to move forward with this, or feedback on my current solution would be greatly appreciated. Thanks for reading.
Ps. If it matters, I do support buildings with multiple floors. That is one of the reasons I figured a point-graph would be easier to deal with than the other types. The point graph is essentially a bunch of points connected to their 8 neighbours (assuming nothing is blocking them) and then special points for stairs and doors which connect to more distant points.