-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding specific Nodes #18
Comments
+1. This would be great. I currently am running into an issue in a tile based game where I want to path find to a node that isn't walkable, but attempting to walk into the node is the desired behavior (e.g., walking into a tavern increases health but the player can't actually walk through a tavern). |
You also want to allow avoiding edges along with nodes. I've run into practical examples where you, for example, don't want to completely block a room off (because it has several other exits that you do want to use) but just a particular exit between two rooms (it's temporarily inaccessible or you don't want to walk through there). |
@mtdowling , @vadi2 : Can you please provide some sketches explaining the problem you are running into and the expected behaviour ? |
In my case I'm using an existing pathfinding system that's been developed and improved through the needs of players - we found that in practice, we need all of: a) room-based locking: for when a room should not be entered into (you enter and die, for example, or it is enemy territory) |
Thanks for all those details @vadi2, a) Room-based locking b) Exits-based locking c) Room-based weighting, d) Exit-based weighting |
(a) probably is, I included it for completeness. The rest of the stuff is interesting - when I'll have time, I'll try using jumper out in Mudlet (mudlet.org). It's a C++ MUD client embedding Lua for scripting. Pathfinding is handled on the C++ side by Boost's A* implementation, with a rich API available to Lua (http://wiki.mudlet.org/w/Manual:Mapper_Functions). The map data is stored on the C++ side but every detail is retrievable in Lua, so you can in effect pull all the data out and use your own pathfinding algorithms - making it possible to play with Jumper in it. |
Could be an interesting feature to be added to the pathfinder class. Sometimes, we do want to avoid some specific nodes without marking them as unwalkable. I am thinking of adding those methods to the API:
Typically, a function will be passed to the former method. That function will be called on each node to check whether or not the node should be ignored from the search.
The given function should be prototyped as specified below, and will return a boolean.
The text was updated successfully, but these errors were encountered: