If you don't need the AI to move around obstacles intelligently, you can just make nodes on the map(positions that the AI will walk to) and then tell the AI to move to those points accordingly. If you DO need your AI to move through some kind of maze or a large amount of obstacles, then A* would benefit you. I was interested in A* a while ago, and succeeded in creating a simple grid that used the A* algorithim and raycasting to find the best path. One thing to note though is how poorly Roblox's engine can handle that many lines of complex code in an instant. This is why I would steer away from A*, and maybe wait until Roblox releases their in-studio pathfinding that they announced during virtual bloxcon. It is likely that the built-in pathfinder will be editable and will run much quicker than a several-hundred line script with A*
tl;dr: I recommend not using A* atm because roblox can't handle that much math at once, and to wait until roblox releases their built-in pathfinder. |