Get the latest tech news
Pathfinding to a moving target in evolving terrain
In this post, I'm going to describe how I used direction fields to introduce fast and dynamic pathfinding to a browser game. I recently publ...
The direction field approach produced no noticeable lag in the browser, allowed the game to scale to more enemies, and most importantly, was really fun to figure out. [5] This algorithm assumes that placing an obstacle does not created a disconnected component of the grid, meaning an enemy in any (non-obstacle) space can reach the player. [6] If you're implementing diagonal movement, a route is also ruined if there's an obstacle orthogonal to the direction of the pointer, even if the start and end cells themselves are clear.
Or read this on Hacker News