Questions tagged [path-finding]
Methods used to map out a path of travel from one point to another, typically avoiding obstacles in the way.
739 questions
1
vote
3
answers
242
views
Enemy movement system on a 2D grid (Zelda-like)
I’m trying to implement a top-down Zelda-like enemy movement system. Consider a screen of x tiles wide by y tiles tall, each tile being 16x16 pixels.
I’m not asking for code here. I’m asking for ...
0
votes
1
answer
143
views
Modular Pathfinding Between Connections
I'm creating a puzzle for my game, where you have to arrange pipes to transmit an electrical flow from one point to the other. Each pipe center contains a connector hub and each end contains the ...
2
votes
1
answer
187
views
How to adapt the Anya any-angle pathfinding algorithm to handle non-discrete start/target positions?
Recently, I have been investigating the Anya pathfinding algorithm.
Anya is an optimal any-angle pathfinding algorithm.
However, it works only with discrete points on the grid.
Here is an excerpt from ...
1
vote
1
answer
254
views
Is there a way to determine if a Nav Link Proxy is encountered while finding a path between two points in Unreal Engine?
Problem definition: I have an AI (zombie) that is destroying a special object to reach a specific location. The object is stored as a blackboard value and is a child actor of a NavLink(To trigger ...
0
votes
0
answers
76
views
How to optimally transfer between nodes when each connection can only handle a certain number of things at a time?
Let's begin with a picture:
I am currently making a turn-based strategy game set in space where you can settle colonies and have to transfer minerals from the colonies ("foo", "bar&...
0
votes
1
answer
78
views
path-finding question of 2d game server
I'm trying to create a game server. The game I want to create has a following feature.
2d (isometric view)
~300 users can play so a map will be not that small
all units can move in any angle (not ...
5
votes
5
answers
2k
views
Grid-based pathfinding for a lot of agents: how to implement "Tight-Following"?
Note: the main problem has nothing to do with the TYPE of pathfinding algorithm (A*, flow-field etc), allow me to explain:
I have a 2d grid and a lot of agents moving around, I want it so that ...
2
votes
1
answer
457
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 ...
2
votes
0
answers
100
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 ...
1
vote
2
answers
375
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
1
answer
195
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 ...
6
votes
4
answers
726
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
0
answers
110
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 ...
0
votes
1
answer
152
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 ...
1
vote
1
answer
1k
views
Generate a fully 3D NavigationRegion/pathfinding in Godot 4
I'm making a spaceship game where the enemies and the player have the full 6 degrees of freedom, so can move forward/backwards, left/right, up/down and can also rotate in all three axes. I'm wanting ...
0
votes
1
answer
2k
views
CharacterBody3D gravity isn't working, and player won't touch the floor
I'm trying to create an isometric game with Diablo-like control, but gravity isn't working. The CharacterBody3D won't touch the floor, the print(is_on_floor()) always results false.
Here's my code for ...
0
votes
1
answer
109
views
A*Pathfinding generating wrong path
I'm building a maze game where there's an enemy ready to pursuit the player if the player gets in his range, I'm using A*Pathfinding algorithm to do so, and I build the maze in a procedural way, where ...
0
votes
3
answers
886
views
How to prevent the player from completely blocking the enemy paths in a tower defence game like Fieldrunners?
I am new to Unity and want to create a tower defence game like Fieldrunners.
I need help to create the grid placement area for the towers so that there is always a path for enemies to travel. I mean ...
0
votes
1
answer
157
views
AStar taking care of collisions for a rectangle
How can I explore a path with A* (or another) by taking care of a rectangle collision ?
I have a 2d map, where I know for each coordinate if it is an obstacle :
For example, dark tiles are not ...
0
votes
2
answers
768
views
Defining path for tower defense game
I'm currently developing a tower defense game as a part of a group project in school. This game will be programmed in C++ using SFML. We are having trouble with finding a good way to define the path ...
0
votes
0
answers
144
views
Connecting nodes for A* algorithm
I am currently working on implementing a pathfinding module for my 2D game engine that I am writing in Python using Pygame.
Currently there are objects such as trees or buildings which can be placed ...
0
votes
1
answer
905
views
Making Multiple NavMesh agents go to different destinations in unity
I am trying to make an Rts game in unity and am trying to make it so that units can go to different destinations, I have a selection system that deactivates their Navmesh agents and the script that ...
0
votes
0
answers
252
views
How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]
Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc.
How would they know where to send an NPC or ...
10
votes
3
answers
3k
views
Maintaining unit formation while following path
I'm currently working on a 2D Age of Empires style RTS game.
Here's my problem:
I'm currently using the A* algorithm (via Path finding package) to move my units.
When you select a "group" of ...
0
votes
1
answer
612
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 ...