
There are multiple ways to do pathfinding. One commonly used method is having a navigation mesh or a graph of nodes and then running Dijkstra's algorithm or an A* search on that. In fact, A* is what I used for my adventure games until It's Flot. Instead of a coarse mesh, the graph had a node for every pixel. With low resolution games, there can be just a few thousand nodes to check which can be done even on moderately powerful hardware in a fraction of a second. Unfortunately, for It's Flot, being in full HD, there could be a million or more walkable pixels, leading to a huge slowdown. In certain cases, it could take several seconds to compute a path. So to make the game playable, without having to replace the assets, I replaced the pathing algorithm with one I devised myself. I'm sure I didn't invent something new, but as somebody asked, here's a short description of how it works.
Read more