Pathfinding AI that works with any top-down game. Pathfinds to the mouse pointer in a radius, goes around walls and uses the shortest path. Path setting 1 is follow mouse, 0 is explore, 2 is both.
All code by me, its in beta so dont expect to much. The more segments the more lag, each segment gives another 8^2, so 7 segments is already over 2 million paths. Ive optimized it so its able to run relatively smoothly on 5-6 sections. 600 blocks for the AI and 550 blocks for finding the best path and making it smooth. It uses a grid to find the nearest point to the curser, it pathfinds in 8 directions to optimize the path while keeping the lag low. -Max Sections is the radius it follows in -Sec Dist is how large each grid space is, shortens radius -Speed is how fast the AI moves All code is by me.