ID:2313731
 
So I have a query about pathfinding for something I'm currently trying to do but am having some problems with getting it done. I'm trying to plot a line on the outskirts of a series of dense objects with the only condition being that these dense objects must be adjacent to each other. It's rather basic and simple thing but because of the countless amount of scenarios you could have (like an extremely jagged wall), it's been killing me to create such a thing since I myself get lost in the process (even while making notes and pseudo-code through the entire process). As such, I'm hoping someone can help me out or at least point me to a library that can help me out (there must be one out there somewhere, right? All of the pathfinding libraries I've seen so far are for mob-movement but I just want one that gives me a list of dense objects like say, the perimeter of a building, regardless of how jagged that building might be shaped).

The application for this is to chart a boundary on a battlefield intuitively regardless of what the battlefield appears next to. I've already got it set up to shape the battlefield normally without the collision of any dense turfs but when I tried to have it "snap onto" the dense turfs intuitively, I got a lot of issues and it failed the more complex the dense turfs became. That led to me adding more complexity to the solution which in the end, led to me just getting lost in the process.
Unfortunately, I do not have any personal experience in this area, but I may have a resource that may be of some use to you.

http://www.redblobgames.com/pathfinding/a-star/ introduction.html

Maybe someone more knowledgeable on this topic can chime in should you remain stuck. If not, I am more than sure you are capable enough of figuring something out.

Best of luck to you.