Examples of Tunneling Algoritums?

I keep running into dead ends trying to find a good pathfinding algorithm that will find the “Straightest/Safest” path not shortest between two points and know there might be some cool tunneling algo somewhere that might do what I am looking for.

Just seeing if anyone has any good resources for that.

Ideally some sort of algo that will take path width into consideration as well.

The other idea I was thinking of doing was taking my space that I want to navigate through and pre process it with additional weights for an A* process where it will try to avoid proximity to certain objects.

I know this is not BJS directly related, but is probably a useful game dev conversation.

There is a method that I was thinking of trying that is kinda just made up in my head, that is a combination of A* first to see if the path is even an option, then make some decisions with a “smart” tunneling node that might not take the lowest heuristic path but will try to use it as a guide instead.

You may have a look at YUKA.Corridor() implementation.
A corridor is a sequence of portal edges representing a walkable way within a navigation mesh. The class is able to find the shortest path through this corridor as a sequence of waypoints. It’s an implementation of the so called Funnel Algorithm.
Example - Yuka | Corridor + Follow Path
Example source - yuka-babylonjs-examples/index.js at main · eldinor/yuka-babylonjs-examples · GitHub
Corridor class source - yuka/Corridor.js at 6314fd6f0297197f05342361d36fd5825c3b171e · Mugen87/yuka · GitHub

4 Likes