hi, i implemented your solution and it is definitely a huge improvement to Godot's wonky Navigation2D system! i however wondered if there is a easy way to check for impossible paths as shown in the second picture:
Smart Tilemap 2D for Godot
A downloadable tool for Windows, macOS, and Linux
Smart Tilemap 2D is a simple Pathfinding System for Godot's Tilemaps. It gives you intelligent straight and diagonal navigation for 2D Games. Works for RPG's, Strategy games, Board Games etc...all genres where levels are created using Tilemaps.
All details are well documented
Tile Costs can be easily defined with integrated Tile Editor. F.I.: Mud tiles are heavier to pass than grass tiles, or brick tiles are not walkable at all. Always the fastest way will be found.
Avoiding Obstacles automatically by collision checking during path calculation. Diagonals deactivated in this example, so only straight paths will be searched:
Turn Costs can be set to reduce ZIG-ZAG results, that would appear with unmodified A* search algorithms. This results in a more plausible movement:
High Performance C++ code, used for the search algorithm. Optimized for tile navigation. Results will appear immediately. No need to compile anything, ready for exporting the game.
Comparison by godot3-bunnymark:
- Runs on Godot 3.2. or higher
- Supported platforms: Linux, Windows, Mac, iOS, Android
- Support: info [at] rebound-games [dot] com
- 3 Demos included in the package
- "GDNative works on desktop and mobile. Web isn't supported but it's being worked on" - https://godotengine.org/qa/57254/gdnative-vs-godot-engine-module-whats-the-best-...
In order to download this tool you must purchase it at or above the minimum price of $10 USD. You will get access to the following files:
Log in with itch.io to leave a comment.
Hi, thanks for the feedback, and also for this finding. I'm going to push an update very soon, considering impossible paths.
Update pushed. Impossible tiles are now treated like not walkable tiles. This means the current path simply doesn't change. Therefore pathfollowing can also continue, if it is processing.
For feature requests, please add your comments here. Thank you!