Right, so I’ve started working on a tower defense game!
I’ve reached a point where I want to implement pathfinding, so that the mobs can go from their spawner to the players base.
I’ve set up my map as a 2d grid, and I don’t have any trouble doing pathfinding on it, but I don’t want the mobs to skip a tile at a time, I want them to move in pixels.
So how to I go on about converting a path in a 2d map of 32x32px tiles to the next step the mob should take in pixels?
Edit:
A ss to make it a bit more clear how my mobs move.
Red square on the left, is the monster spawner. Cyan square on the right is the base. Big black dots are mobs. Tiny red dot is a projectile. And the towers are well, towers… Oh, and blue is water or other unwalkable terrain.