This is an improved and commented version of the pathfinding example that I posted in a different thread (just trying to make it more searchable). I do have ideas for future improvements, but this is probably going to be it for a while.
It uses the A* (A-star) pathfinding algorithm, but unlike most other examples, it is not grid based. Instead, it uses polygons as obstacles, and these are defined by a list of vertices.
This means that it is pixel-perfect (not restricted by the resolution of the tile-grid) and objects can move smoothly in 360 degrees. It should also be much faster in many situations, since it uses far fewer nodes (it's currently limited to 100 nodes, which is the same number that a grid-based system would need for a map just 10x10 tiles in size, but I think I need to increase that to 1000).
(as always, feel free to share, use and modify it any way you please )