Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [path-finding]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
32 views

Pathfinding over network and local avoidance

I'm trying to build a little MOBA game (max 10 players) in Unity and i'm really stuck with the pathfinding / local avoidance. Here is what i'm doing when user click to move on the map: Client send a ...
user avatar
  • 309
0 votes
0 answers
48 views

Pathfinding sprite disappears when approaching the player in Unity

I'm trying to make AI for enemies in my game. I applied a pathfinding (A*) script to my enemy sprite, after which the sprite began to follow the player. But when the enemy approaches the player, the ...
user avatar
0 votes
0 answers
34 views

How to increase the size of an empty object with a "Pathfinding" component in Unity 2D?

I'm trying to make Enemy AI for my Unity game. To do this, I watch this tutorial - https://www.youtube.com/watch?v=jvtFUfJ6CP8&t=1163s. The tutorial describes how to use this pathfinding - https://...
user avatar
0 votes
1 answer
57 views

Struggling with breadth first search for hex grid

I cant seem to get breadth first search right. Ive gone through redblobs implementation guides of hex grids and have that all figured out but pathfinding is proving to be difficult. So I have a search ...
user avatar
1 vote
2 answers
51 views

How to identify if entrace to HPA* cluster is faulty?

I have been working on my simple game where enemy would hunt me with A* algo. But it was a bit slow so I found this thing called HPA*. Someone who would decide to help me will probably know how it ...
user avatar
0 votes
0 answers
43 views

Best Pathfinding solution for 2D action-platformer

I'm developing a 2D action RPG with heavy platforming. The combat system and movement take inspiration from Hollow Knight and the Smash Bros saga. I would like to have some type of enemies with really ...
user avatar
0 votes
0 answers
28 views

Finding tiles crossed given a circular path

I have a path that consists of a circular path, the map is broken up into equally sized cubic tiles, I would like to find which tiles were crossed given an arbitrary circular path. ie Given a start ...
user avatar
0 votes
0 answers
75 views

Generating a tilemap and A* grid in unity but they aren't updating correctly

So question is: Why is the unity editor behaving this way (not updating the tilemaps until I go though the scene and click on them) and why is A* not generating the proper grid when Scan() is called ...
user avatar
  • 153
0 votes
0 answers
61 views

Pathfinding on the surface with Marching cubes

I'm making a game where the world is made of 3D density field of Voxels. And I use Marching Cubes to create a mesh using the Voxels. It needs to be fast because You can modify terrain a lot.
user avatar
  • 1
0 votes
1 answer
59 views

How to calculate distance for A* when searching a path on navmesh?

I've read a couple of articles on Navmesh+A* navigation. So, I'm trying to implement a pathfinding for an RTS type of game. However, it seems I don't understand how to calculate a distance for A* when ...
user avatar
2 votes
0 answers
23 views

Help with Flight Path Modeling

I am looking for some input on how to realize a feature I would like to build into my game. (Not technical implementation, just what kind of mathematical models or algorithms would fit my situation ...
user avatar
1 vote
0 answers
67 views

A* Pathfinding with 2x2 player or larger [duplicate]

I am very familiar with A* and is able to make it work well. However I am looking for resources describing how to do find a path with a player size of 2x2 instead of the usual 1x1 on a 2d map. So for ...
user avatar
  • 11
1 vote
2 answers
285 views

How would I actually implement A* pathfinding in a 3D world?

I have been trying to implement pathfinding in Minecraft for a while. Everything is in blocks, so this shouldn't be too difficult. I have gone through a lot of different posts and articles but I haven'...
user avatar
0 votes
0 answers
45 views

In-game computation of heat maps OR pre-computed floyd warshall algorithms for AI path problems

I am working on a project, in developing a simple game. We need to have bots that shoot, ram, flee and chase other bots/players. Currently, I pre-compute my Floyd warshall algorithm so it is ...
user avatar
0 votes
1 answer
28 views

How to handle collisions for short obstacles across a range of scales?

A naive collision system in 3D RPGs can lead to mobs getting stuck on geometry that they would realistically step over and can be a major nuisance to many players. For most games, the solution is ...
user avatar
1 vote
3 answers
385 views

Which AI should I use so as to avoid monsters AND chase bonus pills at the same time?

I'm trying to program an AI for a Pac-Man-like game, where I would be the Pac-Man and move according to two simple rules: move towards bonuses avoid monsters and being killed I read that one can ...
user avatar
1 vote
1 answer
677 views

Java Simple 2D Grid Pathfinding

I want to code some basic pathfinding for my bot in Java. Below is a 2D grid representation of the 3D world. 0s being the places you can go, and 1s being the places that you cannot go. ...
user avatar
0 votes
1 answer
83 views

Find Largest Room in 2d World

I'm currently working on a generated(Perlin Noise) 2D Cave System with Unity. The Caves currently look like this: What I want to do is spawn the Player (and other stuff) in the big Part of the Cave ...
user avatar
0 votes
0 answers
20 views

Pathfinding Only Working in Editor View

I am new to the a* method so still learning. I have two scripts, a Pathfinding script and a GridForPathfinding script. When I am not in the Editor view or looking at the DrawGizmos during play, the ...
user avatar
  • 1
0 votes
1 answer
134 views

How would I incorporate gravity and gravity affecting obstacles into A* pathfinding in a 2d side-scrolling game?

I want to be able to modify the A* pathfinding in a way that I can get my NPC from his current position to any point that's within reach. The tricky part is that this takes place in a side-scrolling ...
user avatar
  • 1
2 votes
0 answers
38 views

Finding a path to a circular zone in continuous space [duplicate]

I need to find the shortest path for an agent that wants to use a ranged attack against the specified target. This means that the path's ending point should be inside the range of the attack and have ...
user avatar
  • 121
1 vote
1 answer
82 views

How to create the slow random movement effect you see in shmup enemy idles?

I’ve noticed in a lot 2D shmups, after enemies accelerate onto screen and arrive at their arrival point, they don’t simply sit static at their arrival position, but rather begin to gently move in ...
user avatar
  • 1,297
0 votes
0 answers
34 views

How to make the enemy only start pathfinding when player is within certian distance [duplicate]

Im using A* pathfinding and unity 2d. Also im very new and dont really know how to code well so if you can tell me the code it would be much appreciated. I figured out how to use A* but i dont want ...
user avatar
  • 1
0 votes
0 answers
18 views

NavMeshAgent fails to find paths in certain areas in NavMesh

I've been using Unity for about 2 days, and I have a scene with a navmesh. I can click on the NavMesh and get the NavMeshAgents to move to that position most of the time. However, there is a region of ...
user avatar
0 votes
1 answer
46 views

Movement within a circle, but the circle bends around obstacles?

I wish I knew a better way to phrase this, but I want to make an object move from point to point inside a circle. But I also want that "circle" to bend around obstacles, so that no matter ...
user avatar
0 votes
1 answer
38 views

Ponderate dijkstra relative to previous position

I use dijkstra in my rust game to find path to a destination. My game is in a square grid like this: There is, for illustration, the Rust code which use dijkstra: ...
user avatar
  • 125
1 vote
1 answer
76 views

Why does a 3D scene need to be voxelized before it can be transformed into a navmesh?

Why do solutions such as Recast voxelize a 3D scene before transforming it back into polygons? Would it not be possible to just determine intersections of meshes, check for slope angles and adjust ...
user avatar
  • 448
0 votes
0 answers
102 views

How to generate a navmesh from a set of 3D meshes from scratch

I've found a great article on how to build a constrained delaunay triangulation that can be used to create a simple navmesh from cutout geometry. However, this does not seem sufficient to generate a ...
user avatar
  • 448
1 vote
1 answer
40 views

Traversing an acyclic binary tree to construct paths from a given starting node, but the paths come out wrong

The tree is an acyclic binary tree. It's composed of node objects that have a list of connections to link objects (at most 3), and link objects that have a list of connections to node objects (always ...
user avatar
1 vote
1 answer
887 views

How does HPA*(Hierarchical Pathfinding A*) really work?

I'm currently researching for a summary paper on the different variants of A* search algorithm and how they are used in games and I stumbled across the name HPA*. I've heard that it's much more faster ...
user avatar
0 votes
0 answers
71 views

Sparse voxel octree for 3d pathfinding and Manhattan distance

I've been learning about using sparse voxel octree for 3d pathfinding based on Daniel Brewer's chapter in Game AI and his talk at GDC 2015. One aspect that I'm really confused about is exactly what is ...
user avatar
  • 101
4 votes
2 answers
446 views

How can I create the arriving/ engaging in combat movement like in StarCraft 2?

I currently have two armies (smaller scale) crashing into each other. They will usually form a line of units fighting. I have no idea how to handle a unit coming from behind the line to properly go ...
user avatar
0 votes
1 answer
41 views

Pathing for pipe style layout

I've been trying to think of ways to approach doing a pipe style game like the one pictured below, but am coming up short. The pic is from Star Trek Elite Force 2, the hacking minigame part. I've ...
user avatar
0 votes
1 answer
47 views

Path solving for a game with a similiar pathing mechanic to Anno

I cant quite wrap my head around how to solve pathing in my game. The basic premise is you will place buildings and roads on a 2d field and then you will be able to create routes from one building to ...
user avatar
  • 101
0 votes
0 answers
51 views

How to inform pathfinding of solid objects blocking path?

I'm sure this has been asked before, but I couldn't find the thread. Let me know if you can locate the duplicate. So, I have a my level is an array of tiles, where a tile can either be solid or ...
user avatar
0 votes
1 answer
40 views

A* Pathfiding movement is not stopping and constant

I'm trying to make my player move towards mouse click using A* Pathfinding but I'm having some odd issues that I can't solve. One of the issues is that player is moving a little bit even though it ...
user avatar
0 votes
1 answer
176 views

How to perform right-angle pathfinding?

I'm developing a procedural dungeon generator using pre-built rooms and currently I'm using A* pathing to create corridors to connect one room's door to another room's door. The problem with this is ...
user avatar
0 votes
0 answers
109 views

Using Jump Flooding Alghorithm for pathfinding?

I am creating a distance-to-river texture. I am using the Jump-Flood Alghorithm in a compute shader to do this using simple distance() and it works well. See code below. I want to augment this by ...
user avatar
  • 1,376
1 vote
1 answer
59 views

How to get all tiles along a straight vector path?

Let's say I have a 100x100 map of tiles where each tile is 16x16 pixels. How would I get all tiles along a path? For example, let's say I wanted to get a list of all tiles along the shortest direct ...
user avatar
0 votes
1 answer
108 views

How can I maintain a contiguous area when generating a tilemap using Wave Function Collapse?

I'm using Wave Function Collapse to generate a tilemap, and I'm trying to come up with a way to maintain a contiguous area during generation. As an example: ensuring all "walkable" tiles are ...
user avatar
  • 591
0 votes
1 answer
88 views

A* algorithm: need help fixing path that come in contact with obstacle

I am using A* as a pathfinding technique for my AI; it works fine until it gets close to an obstacle (in my case rocks). Right now it just continues the loop if it finds a neighbor thats a rock. It ...
user avatar
  • 17
4 votes
0 answers
184 views

Flowfield pathfinding behind obstacles on symmetrical grid

I use Fast iterative method to create my flow field. However when an obstacle is on the same axis as the destination, the vectors behind the obstacle point directly to the destination and ignore the ...
user avatar
0 votes
1 answer
171 views

Java A* Algorithm: going to a specific tile that moves you to another tile

I have my AI to where it only looks at the 3 tiles in front of it for pathfinding which depends on the direction. However during pathfinding it may check a tile that is a action tile. An action tile ...
user avatar
  • 17
1 vote
1 answer
79 views

Java Game: A* Algorithm (searching only cells in front of character)

Game Type: grid tile map that is turned based Directions allowed: Left, Forward, Right (to reverse directions you must either use two lefts or two rights) - both left and right moves diagonal but ...
user avatar
  • 17
4 votes
0 answers
105 views

Navigating an AI that shouldn't take the shortest path but the scenic route instead (e.g. fish)

I'm working on a sidescrolling game with an underwater "fish-like" AI that has some goals (interacting at various locations) and things to avoid (player). Started of with a Navmesh and ...
user avatar
  • 151
1 vote
0 answers
54 views

Line of Sight/Clear Path Check Theta* For Rectangle Character

I am implementing Theta* pathfinding in a tile-based 2D game. A tile is either blocked or unblocked. The character has a rectangle collider with a width and height in tiles. Is there an algorithm for ...
user avatar
  • 11
0 votes
0 answers
163 views

Path following with turning radius and obstacle avoidance

I would like to move an object through a path found by A* star but taking into account the object's turn radius and movement speed, while also avoiding possible obstacles during a curve. After some ...
user avatar
4 votes
1 answer
194 views

Restrict A* pathfinding to overlapping "safe zones" within map

I've been bashing my head against this idea for a few days without luck, I'm hoping someone sees something I don't. So I have a 2D map containing walls and obstacles, and I have a unit that navigates ...
user avatar
  • 762
2 votes
1 answer
518 views

Given a 2D array, how do I generate a random path of fixed length from a random point at length 0 to a random point at max length?

I'm trying to generate a random path on a 2D grid given that: The width and height of the grid are given The length of the path to generate is given The path can't move "back" The path ...
user avatar
0 votes
1 answer
50 views

How to assign an index to different node clusters? (for pathfinding)

Hellow~ So for a bit of context: i'm currently working on a RTS (way above may league) which already has a level editor and a node grid which maps the terrain, i previously make a navigation system ...
user avatar

1
2 3 4 5
14