This might look simple, but it’s paramount that this function works well in order to avoid any bugs that cascade later down in the algorithm. Now we have a grid. Cool! But there’s no pathfinding, or a ...
This may not be the best pathfinding system. It doesn't support multi-level navigation in height or teleport points. But it's simple enough for me to easily implement A*, JPS, and JPS+ pathfinding.