Author Topic: Planet pathing algo?  (Read 976 times)

Offline RCIX

  • Core Member Mark II
  • *****
  • Posts: 2,808
  • Avatar credit goes to Spookypatrol on League forum
Planet pathing algo?
« on: February 20, 2010, 01:52:34 am »
I have a question: What method do you use to figure out the fastest route between planets? A simple A*?
Avid League player and apparently back from the dead!

If we weren't going for your money, you wouldn't have gotten as much value for it!

Oh, wait... *causation loop detonates*

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Planet pathing algo?
« Reply #1 on: February 20, 2010, 02:07:22 am »
In Alden Ridge, I developed a sophisticated multi-layer, multi-agent pathfinding algorithm (so that 300 zombies could solve their path to each human player at once, for example -- though most levels only have 5-20 zombies) that is sort of a simplified-but-more-powerful version of A*.  It handles diagonals better, and such, as well.  I attached some technical notes about Alden Ridge, that talks about some of the pathfinding at least a bit.

For AI War, I'm basically using a slimmed-down version of that, but one that is tree-based instead of grid-based.  Really that's not a whole lot different, I'm using the same methods of valuing and range-checking and such.  But with my custom algorithm, it lets me put in weights for things like friendly planets, etc.  And it's actually even more complex than that, because it tries to find friendly planets that are nearby, and then move through them, and so forth.  It's not a perfect algorithm, particularly when you are in enemy territory trying to get out, but the fundamentals are rock solid.  Some of the higher-level decisions it makes needs some tweaking at some point, for those specific cases.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!