Do I need to learn graph theory if Unity provides NavMesh AI

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:

  1. Do I really need to learn graph theory and algorithms (like A*) if Unity gives me NavMesh AI?
  2. 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.

I’m actually working on two games right now:

  1. A horror game, kind of like Silent Hill mixed with Alan Wake.
  2. 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?

For both of these, assuming 3d, the Navmesh should do the trick.

In terms of DOTS, that’s a whole different programming paradigm, and if you’re using DOTS then you’ll likely need to roll an A* to handle things.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.