Questions tagged [path-finding]
Methods used to map out a path of travel from one point to another, typically avoiding obstacles in the way.
717
questions
0
votes
1
answer
23
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 ...
0
votes
2
answers
110
views
How to make ranged RTS units move to their firing range from an opponent using flow fields?
I am trying to make a simple real-time strategy game (only the battle system of units fighting each other; no building, no economy, only battles and victory). I am using flow fields to make the units ...
0
votes
0
answers
70
views
Obstacle avoidance via steering behaviour when near gaps
I'm trying to implement RTS-like character control on C++/SDL2 for a character with a rectangular hitbox. I have a path-finding algorithm ready and I want to implement obstacle avoidance steering ...
1
vote
1
answer
109
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
0
answers
67
views
A* implementation does not work correctly
I'm trying to implement a 3D pathfinding system based on the A* algorithm. This tutorial served as the starting point for my implementation. I tried to remake it for pathfinding in three dimensions, ...
0
votes
0
answers
34
views
How to apply avoidance to path following with root motion?
My Character Blueprint uses Root Motion to control locomotion (taking location and turning it into a direction to move).
However, root motion is not compatible with avoidance pathfinding such as ...
0
votes
0
answers
135
views
Navigation in a TileMap with 2 types of tile in 1 cell in Godot4
I'm stuck with the navigation in a TileMap based scenario in Godot 4. My intention is to make the enemy (boats) to chase the player while avoiding procedurally ...
0
votes
1
answer
159
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 ...
1
vote
1
answer
414
views
How to deal with large number of Navmesh Agents?
I have more than 200 units in a single scene, all of them use Unity's NavmeshAgent to set their destinations to the main target. The problem I'm facing is that some ...
0
votes
1
answer
64
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
2
answers
110
views
Weighting navigation mesh nodes for A*
I'm trying to implement path finding for my game using a navigation mesh and A* search. While I believe I got this working correctly I'm having trouble getting desired results because I don't know how ...
0
votes
3
answers
245
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 ...
1
vote
0
answers
75
views
What's the best way to store irregular areas of my map? (hierarchical pathfinding and grid segmentation)
This is for the development of a roguelike/management game.
I'm trying to implement HPA (hierarchical pathfinding with A*), and I've found a few good resources (suggestions appreciated) in the forms ...
0
votes
1
answer
51
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
1
answer
109
views
Implementing a bot to find the player in a grid
I have a 2d array with ground represented by 0s and the walls represented by 1s.
Player can use a LOOK command or a MOVE command. Look command returns a 5x5 array centered around the player and the ...
0
votes
2
answers
349
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
1
answer
1k
views
Creating a nav mesh
I'm coding a custom engine using Python and Pygame. It's a top down 2D isometric RTS and I wan't to implement pathfinding for my units.
My research has lead me to using a Navigation mesh which seems ...
0
votes
0
answers
48
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
0
answers
74
views
Pathfinding and Navigation - General Approaches
I'm currently working on getting smooth multi-agent pathfinding and navigation working. I have gone through several papers in these areas and implemented them. What I'm a bit confused about now as to ...
0
votes
1
answer
341
views
Player overshoots path using NavigationAgent2D and NavigationPolygonInstance in Godot 3.5
I'm trying to add a click to move feature in my game using the new NavigationAgent2D and NavigationPolygonInstance but sometimes when the player reaches the end of the navigation path or changes ...
0
votes
1
answer
480
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 ...
10
votes
3
answers
4k
views
How can I shorten the length of time spent on finding a path using my A* pathfinding code?
I am working on a game where the player and enemies move between discreet tiles, with only orthagonal movement (like pokemon). The game also runs on a turn system, so the player makes a move input, ...
0
votes
0
answers
117
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 ...
1
vote
2
answers
92
views
Dynamically generating and modifying non-Euclidean/Tardis houses while maintaining AI navigability
General Description
I want to build a tech demo about a game concept I am carrying around for quite some time now. A lot of influences from different sources shaped this, and I will try to hint on its ...
9
votes
3
answers
2k
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 ...
2
votes
0
answers
268
views
What's the best strategy for incorporating jumps into a 3D AI navigation algorithm?
I'm trying to make a game centered around chase sequences in a 3D level with a high degree of verticality and movement options for the player. Basically think Breath of the Wild in an urban landscape ...
0
votes
1
answer
334
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 ...
0
votes
0
answers
153
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 ...
0
votes
1
answer
227
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 ...
1
vote
2
answers
109
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 ...
0
votes
0
answers
113
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 ...
0
votes
0
answers
194
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 ...
0
votes
0
answers
232
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.
0
votes
1
answer
153
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 ...
2
votes
0
answers
37
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 ...
1
vote
0
answers
200
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 ...
2
votes
2
answers
1k
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'...
0
votes
1
answer
30
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 ...
1
vote
3
answers
458
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 ...
1
vote
1
answer
2k
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.
...
0
votes
1
answer
122
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 ...
0
votes
1
answer
405
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 ...
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 ...
1
vote
1
answer
153
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 ...
0
votes
0
answers
124
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 ...
0
votes
0
answers
108
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 ...
0
votes
1
answer
85
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 ...
0
votes
1
answer
41
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:
...
1
vote
1
answer
99
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 ...
0
votes
0
answers
386
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 ...