Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

RPG Farming Kit

Project template to make farming RPG games. · By Lowscope

Feature Request: Pathfinding

A topic by chrisnathan1983 created Nov 27, 2018 Views: 133 Replies: 3
Viewing posts 1 to 3

Could I get some help on implementing pathfinding. After some research, it would seem that the best approach would be to modify GridManager for the A* node creation and then create a script that interacts with mover to follow the path returned. Perhaps it's a feature others would appreciate. Thanks for the amazing asset!


Hi Chris, my apologies that it took this long for me to see this message.
For quick contact is the fastest means of communication.

Your research sounds like a correct approach.
At what part of the process are you at the moment? I'm willing to help you out on this.
I agree that it would be a good addition to have proper path finding in the kit.

This might also be worth looking into, in case you are in a rush of getting something working.

I haven't finished anything, but I modified the code from

I created a NavManager that attaches to the grid object. At start, it searches all the tilemaps for colliders. If the tilemap has a collider, it creates a wall node where it finds a tile. I choose to not go the same approach as the original scripts which does a bunch of raycasting and physics tests; though it seems like that was a mistake, as plants aren't included as a wall node. Easy to re-implement.

Secondly, I attached a NavAgent script to the player that gets a path from the NavManager. Using the path, I send the direction to the Mover script.

It works OK, needs more work. I was really surprised with how quickly I was able to get it working from the code mentioned above. Great scripts!


Interesting find!

Sorry for answering late again. Things have been very chaotic lately.
I won't be able to implement this into the project directly, due to potential licence issues (No licences specified).
But it is a good resource nevertheless.

Currently there are other resources I need to attend to before continuing on a update for the kit.
I will do my best to free some time in early 2019 and implement a A* solution with your given resource as reference.

Hope it is going well for you so far.

Thanks you for sharing your findings!