Hi guys I've been making a simple game of pacman. Currently I have the map, Pac-pills, Pac-man, Movement and Powerpills in the game all working as intended.
I'm trying to implement my first ghost and get him fully working before worrying about the others
I really need help making my ghost chase Pacman, After some research I'd like to use Dijkstra's algorithm and nodes but I cant figure out how to implement these into pacman.
I've found several tutorials that show how to use the algorithm, finding a path between 3 or 4 nodes.
The main things I'm having problems with is giving a node a position in my map, how to make the ghost move according to the nodes positions and how to detect which node is closest to the player.
Any help would be appreciated.