1
\$\begingroup\$

What will be the best algorithm or logic that can be used for game like greedy spiders. As far as I can think it is based on A* algorithm ? Where the shortest path has to be a search between the spider and the flies.

Is there any better logic to implement that game?

I would like to learn the concept behind it. How they will be managing nodes and edges concept?

\$\endgroup\$
1
  • 6
    \$\begingroup\$ You may want to explain the concept for those who don't know what "greedy spider" is. You can edit your question to do so. People like annotated screen shots too. \$\endgroup\$
    – House
    Jun 26 '12 at 13:44
2
\$\begingroup\$

It really depends on the accuracy you want the pathfinding to have and the amount of nodes you have. I would recommend the A* search algorithm, and then you can experiment with the heuristics. By example the Manhattan heuristic is really fast but doesn't got the accuracy like the Euclidean heuristic.

For a game like Greedy Spiders I would go for an accurate heuristic since there aren't much nodes, the Euclidean heuristic will suffice here.

This is a really good tutorial I once used for a game which explains a lot about it: A* Pathfinding for Beginners

\$\endgroup\$
2
  • \$\begingroup\$ Thank you so much dude .... for explaining things ... That link is amazing for beginner . \$\endgroup\$ Jun 28 '12 at 6:12
  • \$\begingroup\$ Archived link for A* Pathfinding for Beginners. \$\endgroup\$
    – Rodia
    May 25 '18 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.