Imagine a classic Roguelike game such as Stoneshard for example; you move on a tile by tile basis and your enemies do the same.
I am trying to simulate the same effect; having enemies in my game to pathfind their way to the player but moving based on tiles rather than fluid movement.
The way I did it so far is to add both the Pathfinder and Tile Movement behavior to my enemy. But the results are really, really slow and off. Like sometimes the enemy would go far away from the player before starting to move towards them.
Here is a GIF of what I mean by slow
Originally I set my cell size to 16 (since I am planning to use 16x16 tilesets as seen from the sprites I am using. But that was a nightmare as the enemy would zigzag their way towards the bottom of the layout before starting to move upwards towards the player and it was much slower than what you're seeing here.
Here is a screenshot of my current setup for both behaviours:
Any ideas what I can do to achieve this?
Side question; any idea how to setup this same behaviour but in a turn based system? Right now things are moving in real time. Any hints how I achieve turn based pathfinding and tile based movement for enemies?