Pathfinding 1 (Platformer / Side Scrolling)

257
258
1
2

Left Click or Tap anywhere to set the Target's location, and the Characters should move and jump to get to it. _____________________________________________________________________________________________ This is just a little demo of some super simplified "pathfinding"---it doesn't use any optimization methods (such as A*), but does find a path to the target. The Waypoints have one extra check in them to account for Characters' jump height. Note that this method can considerably affect game performance when used on a large scale. _____________________________________________________________________________________________ The code here may not be the easiest to understand, though I've tried to make it as simplified as possible.

Editor