Question

Hey, I am making an AI on ROBLOX and I can't seem to figure out where to start for path finding, the most common AI feature. Can anyone help?

P.S. I don't know any raycasting, so I can't use that as my option.

Was it helpful?

Solution

As already suggested, you'll want to take a look at the A* algorithm. It's the workhouse of pathfinding. If you don't think you can do that, try something simpler. There are many techniques out there, including breadcrumb trails for pursuing AI characters, for example. You could even apply a barebones (1,0,0) vector for moving right, (-1,0,0) vector for moving left, and so on at specific intervals while your game is running. Just get something working first. In any case, you'll probably encounter graphs at one point or another while adding pathfinding, so read up on the subject.

OTHER TIPS

Look up the "A*" algorithm.

Does the A* Algorithm really help? Go here for a lesson on Pathfinding AI: http://lessons.lualearners.org/lesson?id=77

Roblox have released a PathfindingService which makes pathfinding quite easy :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top