[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

## A* pathfinding alternative Started by Blex Aug 11 2018 08:29 AM

2 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

### Blex

[GLOBAL: userInfoPane.html]
Blex
• Corona Geek

• 1,199 posts
• Corona SDK

I've heard that A* pathfinding is one of the best ways to implement AI so that it finds and reaches the player, but is there another alternative to this?

[TOPIC: post.html]
#2

### roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
• Corona Geek

• 7,494 posts
• Corona SDK

If you want to learn about pathfinding and you want a Corona ready solution, use Jumper:

Original:

@alexpanc's branch and mods for Corona: https://github.com/pancinteractive/Jumper

Alex talks about his usage a little here: https://forums.coronalabs.com/topic/70156-startpoint-to-endpoint-pathfinding-in-segreta-2-with-jumper/#entry

PS - There are myriad 'other' pathfinding solutions, but something tells me you need to back up a bit and understand what path finding is, what problems it solves, then consider what problems you are trying to solve.

You can run into pathfinding and just skim the surface or dive in deep and learn a lot.

One great place to learn about pathfinding (and many other fun topics) is Amit Patel's site: https://www.redblobgames.com/

[TOPIC: post.html]
#3

### StarCrunch

[GLOBAL: userInfoPane.html]
StarCrunch
• Contributor

• 787 posts
• Corona SDK

A* is a special case of Dijkstra's algorithm for finding paths through graphs. (A grid is just a graph where the vertices are on the centers of the squares, each connected to its neighbors.) There are a few alternatives in the "See Also" section on that page, as well as in the "Graph and tree search algorithms" sidebar.

"Finding and reaching the player" might sometimes be more than you need, of course. For instance, you might only want to know if two characters are in the same region, and there are some handy data structures like disjoint sets to assemble this information and query it.

[topic_controls]

[/topic_controls]