ravertass / PixelHunter1995

Point and click goodness
0 stars 0 forks source link

Pathfinding within walking area #27

Open ravertass opened 4 years ago

ravertass commented 4 years ago

Make it possible for the PC to find its path within a walking area, which can be a polygon of any form.

Idea: Split the walking area polygon into convex sub-polygons. Within a convex polygon, it is always possible to get from point A to point B by walking in a straight line. Then the sub-polygons can be treated as nodes within a graph, and path-finding within the larger walking area polygon will be easy.

ravertass commented 4 years ago

The polygon-splitting part of the stated idea has been implemented (at least a simple version of it has). Actual pathfinding within the walking area is yet to be done.