Pathfining stuff
Say this grid represents local scene tiles in a game, the green square represents the local player, grey reps barrier (wall etc), and brown reps a door/gate/etc, and blue represents where I want to go
Any ideas on algos/proper way if I wanted to scan the blocking around a tile for a passage into the area if that makes sense?
In this example, would traverse along the wall until it finds the door
Any ideas on how the basic logic to achieve something like this might look logically speaking?
7 Replies
Did you ever hear about Dijkstra's Shortest Path algorithm?
Yes. Atm for long distance mapping im using jump point first. For part of local pathing looking for something more targetted towards traversing an edge till it finds a tile with a door/gate/etc that would enable a complete patch to the target. If the entrance obj is closed normal pathing like that wouldnt find a complete path to the target tile
and you could also modify it a bit to prefer the direction the goal is in (e.g. by using A* or something custom)
Yes but again tile collision if the door is closed wouldnt allow for a path. I suppose i could add a custom case for such objects in pathing and assign a higher weight or something to them to acc if some other door is open already. But that feel kinda hacky. Tho if there isnt a more targetted way to handle it can definitely do that
just treat it as a wall if it is closed and as a normal way if it is open?
yes but, if opening it is the shortest way, or the only way, want to factor that in, in a decently efficient manor
ill probably just implement it into a custom A* algo ig though for the local scene pathing
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one.