Questions tagged [path-finding]

Methods used to map out a path of travel from one point to another, typically avoiding obstacles in the way.

This is a specific subset of which deals with how an entity determines the proper route from point A to point B.

In its simplest essence, it is the ability of an NPC to realize that there is a door next to them, rather than just ram head-first into the wall when trying to reach the next room. Complexity is introduced by factoring in the different kinds of obstacles, and what factors (time, safety, impressiveness) that the entity uses to pick from multiple applicable paths.

722 questions
65
votes
6 answers

Pathfinding for fleeing

As you know there are plenty of solutions when you wand to find the best path in a 2-dimensional environment which leads from point A to point B. But how do I calculate a path when an object is at point A, and wants to get away from point B, as fast…
Philipp
  • 119,250
  • 27
  • 256
  • 336
40
votes
4 answers

How does Flow Field pathfinding work?

Supreme Commander 2 has something called flow field path finding. How does it work? Is there some article available I can read up on how it works?
Spoike
  • 1,461
  • 2
  • 15
  • 21
30
votes
6 answers

what is the standard solution to pathfinding towards a moving target?

I am working on a 2D RTS like game, basic A* works perfectly for moving a unit from point A to point B. But now I facing the continuous path-finding problem, like A attack a moving object B, call A* at each frame once Object B's position changed…
fairstar
  • 501
  • 5
  • 6
26
votes
1 answer

Path finding algorithms?

I posted this question on stack overflow first, but I guess no one is very interested in video games there... What are some path finding algorithms used in games of all types? (Of all types where characters move, anyway) Is Dijkstra's used a whole…
Pojo
  • 381
  • 1
  • 4
  • 4
22
votes
3 answers

Pathfinding with lock and key?

I'm working on a game with maps that resemble lock and key puzzles. The AI needs to navigate to a goal that may be behind a locked red door, but the red key may be behind a locked blue door, and so on... This puzzle is similar to a Zelda-style…
congusbongus
  • 14,835
  • 58
  • 89
15
votes
4 answers

A* Algorithm for Tactical RPGs?

I'm messing around with writing a really poor tactical RPG in C++. So far I have a 2D tile map and just got the A* algorithm working based on the pseudocode in the wikipedia. But real tactical RPGs don't just find the best path on a flat plane and…
user137
  • 443
  • 4
  • 9
13
votes
2 answers

Tweaking AStar to find closest location to unreachable destination

I've implemented AStar in Java and it works ok for an area with obstacles where the chosen destination is reachable. However, when the destination is unreachable, the calculated "path" is in no way to the closest location (to the unreachable…
Shivan Dragon
  • 1,400
  • 2
  • 16
  • 23
10
votes
2 answers

How can I compute the shortest path in Euclidean environments with non-convex polygons?

Can someone suggest papers or algorithms about calculating shortest paths in Euclidean spaces with non-convex polygon as obstacles?
aneuryzm
  • 201
  • 1
  • 2
8
votes
2 answers

Is Jump Point Search (A* with JPS) appliable to non-diagonal grids?

I'm trying to speed up my pathfinding and discovered A* with JPS. It basically prunes tiles before adding them to the OPEN set. Can I use that technique with my grid that only allows straight directions?
Sven
  • 387
  • 3
  • 9
8
votes
2 answers

Multi-tile agent path-finding algorithm?

Suppose we have a uniform rectanglular grid as shown below. The a is an agent, o is obstacle and g is goal. What are the options of handling multitile agents (e.g. dragons or tanks)? . . . . o . . . . . . . o . g . . a a . . . . …
zzandy
  • 363
  • 1
  • 11
7
votes
2 answers

What heuristics are used in NavMeshes?

What heuristics do programmers use in A* pathfinding for NavMeshes? NavMesh = Navigation Mesh, its a type of pathfinding that uses meshes instead of waypoints.
Shawn Mclean
  • 401
  • 1
  • 5
  • 13
7
votes
1 answer

How to handle pathfinding on a non-grid/non-node terrain map

I'm not sure if this is even path-finding. All I have is a 3D map that has hills, etc. I'd like the enemy to flock an object, but also walk around other objects. These blocking objects may be added after the path is calculated, which would cause a…
Shawn Mclean
  • 401
  • 1
  • 5
  • 13
7
votes
1 answer

Techniques for (literally) cutting corners on square grid maps

My game involves a level with deformable terrain and units that can travel in any direction but are slowed down by uneven terrain. Normal A-star should work fine in most cases, except on flat land where no matter how the general purpose pathfinder…
Meh.
  • 71
  • 1
  • 3
7
votes
2 answers

Path finding between multiple maps

I'm interested in path finding between multiple maps - could be indoor/outdoor maps, different levels in a building etc but the main restraint is that there are one (or more) ingress/egress points between the different maps. I've looked and…
Martyn
  • 243
  • 1
  • 9
6
votes
1 answer

Pathfinding with car steering

Is there pathfinding algorithm which takes car steering into account? I have large space where user can place cars (trucks actually) and other blocker objects. Objects can be placed vertically or horizontally oriented and have different sizes (may…
1
2 3 4 5 6 7