I’ve been working on an easier method to do pathfinding with Defold. After some experimentation and successfully using it within several small projects, I feel that it is ready for public testing and utilization.
I am calling it NavGo (Navigation Game Objects). It works through having the user place down various nodes around the level/collection. During runtime, a map is created of the connections between all nodes, connections can include or ignore collision groups. The generated map can then be used to calculate paths throughout the game space.
Currently there are two ways to accessing the map data:
- By using a singleton named “NavGO_Global”.
- Through messaging the NavGo Handler Game Object.
I have attempted to document the system as best I can in the github repository ( https://github.com/DrCampbell2017/NavGO).
Layout In Editor:
Includes a Debug Mode for seeing the paths created:
Note, you can set the max distance between nodes for a path to be created, hence why the bottom two do not connect.
During Runtime, all nodes are automatically hidden:
Here is an example project I made with the NavGo:
With the above example, there is currently an AI bug that causes the enemies to run from the player, this is not an issue with the NavGo
The github repository also includes a small project where the NavGo can easily be demonstrated both by messaging the NavGo Handler and by using the singleton.
This is also my first time using the public repositories on github, I have no idea how to create the “archive/master.zip” I see on other projects. Help doing that would be amazing!
I still have this project marked as an Alpha release. Please let me know if you discover any bugs, have any feature requests or other comments on what I can do to improve this project.
Thanks for the read and good luck on your projects!