Questions tagged [path-finding]
Methods used to map out a path of travel from one point to another, typically avoiding obstacles in the way.
728
questions
2
votes
1
answer
397
views
2D Pathfinding with rope constraint
I have a character linked by a rope to a fixed point, in an environment with obstacles.
I want to do a pathfind that take into account the rope.
Here, if the character followed my current pathfind in ...
-1
votes
1
answer
43
views
Finding grid squares a set number of hops away while avoiding obstacle cells, without AStarGrid
I am simplifying my project for clarity:
I am currently making a game which has a 2D grid and a player moving on it.
At the start of the players turn they roll a 6-sided die and can move that many ...
1
vote
0
answers
60
views
Get a obstacle avoidance path base on a grid-based map and non-grid based movement
black line is grid-based path got from A* algorithm, and red one is smoothed path by use Funnel algorithm.
when B move through T or stop at T, it will overlap with A, My problem is how to get a path ...
0
votes
0
answers
57
views
How to optimize random path generation with checkpoints and collision detection
I'm looking for a way to generate a random path based on midi note onsets (timing points) for a simulation/game.
I will briefly explain how it works for context:
I'm working on a simulation type game ...
2
votes
0
answers
64
views
How to make enemies navigate around each other in a grid-based game?
I am making a 2D top-down grid-based game where the movement is similar to older Pokémon games so it's locked to a grid. I implemented A* pathfinding for my enemies with a bool[,] that indicates ...
2
votes
1
answer
176
views
Recreating StarCraft 2 pathfinding – no navmesh method seems fitting
As a hobby project I am trying to re-create pathfinding similar to StarCraft 2 based on the presentation from GDC 2011: https://www.gdcvault.com/play/1014514/AI-Navigation-It-s-Not
(Image source)
The ...
1
vote
2
answers
104
views
A*, what to do about duplicate items in the min-heap, if anything?
I'm trying to implement A*.
I'm storing the queue of nodes to visit in a min-heap, and I'm seeing the same node being added more than once to it (with different priority). Wikipedia's pseudocode ...
1
vote
0
answers
25
views
How do I get a Unity Job to update external data?
I'm relatively new to Unity, and I wanted to use the Job system for a complex pathfinding algorithm, since it will likely be used alongside multiple instances of NPCs attempting to find a valid route. ...
1
vote
1
answer
84
views
A-star algorithm after 2D tilemap 90-degree rotation
I am learing Unity and for now trying to implement a simply pathfinding alogorithm in a simply 2D isometric diamond-shaped tilemap.
Recently I learned a way how to rotate tilemap and I already have a ...
0
votes
1
answer
71
views
How to delete unnecessary points given a jointed path
I'm writing code for client-side pathfinding, the player can setup more than one point and then pathfinding in segments finally get a concatenated path.(actually it's for the long distance pathfinding,...
6
votes
4
answers
533
views
In a tile based game, with units that can move a specific amount per turn, how do i make my pathfinding avoid damage unless it is the only valid path?
i am making a 3d tactics game, visually similar to something like final fantasy tactics. it's tile based, with units able to move up and down the level onto buildings and up staircases and what have ...
0
votes
1
answer
51
views
I'm trying to find a way to iterate through a list of game objects to find furthest object in the list. Then re iterate if path is blocked
I've got the first part of the code working. It iterates and does a check through the gameobjects to find the furthest nav point to hit. Then it calculates path to see if its valid or not. Now I'm ...
0
votes
0
answers
75
views
Find the best attack position
I'm doing what this thread is doing except that it's not very satisfactory. What this does is finding the "closest" attacking position. But typically you want the attacker to attack from as ...
1
vote
1
answer
160
views
Funnel algorithm : not possible with all convex polygons?
Disclaimer : yes, the whole map is not convex. But all of its subdivisions are ! (And that's what matters)
Hi ! I got A* working with nav mesh. Now I need to find the tightest path along the mesh path....
0
votes
1
answer
66
views
Grid-Based pathfinding with object size. Avoid colliding into big-enough spaces
I already implemented a Grid-Based pathfinding algorithm and I works. I also updated it so it takes into account the objects size and ignores paths where the object wont fit. However, I ran into a ...