-
Notifications
You must be signed in to change notification settings - Fork 24
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
Entity blocking itself #11
Comments
Hi @Lurler, Interesting, are you able to provide an example? Is the issue that the algorithm can't start on a square that's classed as obstructed? thanks, val |
Thank you for quick reply! Yes, if you try to start the search from a cell that's marked as blocked it cannot build a path anywhere (and returns an empty result as expected), same goes for trying to build a path to a cell that's blocked. That is understandable why it can't do it in both cases, as technically those cells are blocked. Still, I think it is very useful to be able to disregard the blocked status of start and end points of the search precisely because they can be blocked by entities that are doing the search. |
I also have this issue. I have castles on a map, that are obstructions, that I want to find paths between, but without modification no paths can be found. |
Hey!
There's a small issue with using the library. I'm not sure how to elegantly solve it without some hacks...
I have a grid (WorldGrid) which stores not just terrain data (e.g. which tiles are walkable/blocked) but also takes into account all entities on the map and block those cells as well, so entities don't walk to top of each other. I think this is pretty normal implementation for most games.
But here's the problem. Since the entity is actually standing in the cell it can't build a patch because the cell it is standing in is also considered blocked... I can obviously add some hacks where the entity first marks the cell it is standing on and the target cell as walkable, but it isn't exactly a good way to address it.
Maybe you can just add two simple options along the lines of:
Or something of this nature. Basically so that:
Obviously if there's a better solution that I have missed please let me know :)
The text was updated successfully, but these errors were encountered: