I’m remaking a tile-based movement dungeon game like Pokémon Mystery Dungeon, or Pixel Dungeon. (I’m only remaking the dungeon part.)
And I need to figure out how to get all active enemies to go toward the player. My initial thought was because I’m using part that exist in the workspace as a grid for the player to move, I could utilize those same tiles for the enemy’s movement.
So how would I go about getting the closest tile to the enemy that is closest to the player (if that all makes sense)?
Easy option: Assume the tile thats in the direction of the player is always the right way, accepting some enemies getting stuck if the player runs around a wall.
Hard option: Implement Djikstra, or find one that you can make work with your map (probably out there somewhere)
I think I’d like to do that as I want to this to function close to perfectly. Can you refer me to any open source script or anything to help me go about implementing this into my game?