I’m a student learning about pathfinding in games. I know the basics of A* pathfinding and that it comes from graph theory (nodes, edges, heuristics). But Unity already provides a NavMesh system with NavMeshAgent and NavMeshObstacle.
I’m confused about a few things:
Do I really need to learn graph theory and algorithms (like A*) if Unity gives me NavMesh AI?
When is it better to use A*/grid pathfinding instead of NavMesh?
It all depends on the type of game you’re going for.
NavMeshAgent is great for 3d games where a character can move to any available position. It’s actually an A* algorithm in which the nodes represent larger areas, but you don’t need to understand A* to use it. It doesn’t work well, however, with 2d games or games like Final Fantasy Tactics and XCom tile type games.
A* itself is is fantastic for tile based games whether they are 2d or 3d. It’s worth getting an understanding of the way this algorithm works.
A horror game, kind of like Silent Hill mixed with Alan Wake.
An RTS game.
So what do you think I should do for pathfinding in each case? Also, someone suggested that I should implement DOTS for better performance , is it really useful for these kinds of games?