🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to keep the pathfinder in lane

Started by
3 comments, last by pithlit 12 years, 9 months ago
I am going to split a narrow aisle into 2 lanes.
How do I keep the pathfinder in lane without swaying left to right in a straight path also that they don't collide?
Thanks
Jack
Advertisement
If you are using a "pathfinder" (e.g. A*), then just make sure your edges don't cross. However, from your question, it sounds like you are not using a "pathfinder" but rather having agents moving at will. In that case, you would either want to look into steering, path following, or flow fields.

See http://www.red3d.com/cwr/steer/ for more info.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Thanks for the info. It's very useful. And I'd like to know how to generate 2 paths that don't cross each other using A*. Assuming these guys don't know about each other context
I may be looking into something called traffic simulation, right?
Thanks
One simple idea for traffic simulation is to have each agent "announce" what they are going to do in the next few time steps, so the other agents consider those spaces occupied in the near future. I would start by using that information in steering behaviors, but you can incorporate it in A* as well.
Flow Annotations sound like what you're looking for. Take a look at Wang and Botea's "Fast and Efficient Multi-Agent Pathfinding" paper from ICAPS 2008.

This topic is closed to new replies.

Advertisement