Search code examples
node.jspath-finding

Find shortest path in online game using NodeJS


I am developing script, which does some things in online game with TCP sockets. I have only map size, starting X and Y and coordinates where i must go. I need to set X and Y every ms, let's imagine that character's speed is 1 tile/ms. How can i easily do this?


Solution

  • Depending on whether you can "see" the entire map or not, you'll need to implement either a pathfinding algorithm or maze solving algorithm.