0

I'm trying to make 2d tower defense game. For now I know there is way to place waypoints along the route, and order units to go via waypoints. But this way I don't like because of 2 problems. First the route is made of straight lines, second all units go via 1 line. I mean even if background picture shoes thick road which can handle several units marching side by side "waypoints" approach dos not allow me to do that. Any suggestions ?

David
  • 4,332
  • 13
  • 54
  • 93
  • 1
    Possible duplicate of [What is a Nav-Mesh in Unity?](http://stackoverflow.com/questions/21176036/what-is-a-nav-mesh-in-unity) – Serlite Mar 14 '16 at 14:20
  • 1
    (Googling for "Unity pathfinding" turned up the official Unity docs as the top result, soooo...I'm not sure it was necessary to post a question on Stack Overflow asking for suggestions.) – Serlite Mar 14 '16 at 14:26
  • In that way let's close this site cause everything can be googled – David Mar 14 '16 at 17:26
  • It is expected that members of this site perform significant research prior to posing a question. It may be helpful to glance through a [relevant Help section](http://stackoverflow.com/help/how-to-ask) to better understand how you should be approaching question-asking here. – Serlite Mar 14 '16 at 17:57

1 Answers1

1

Well if the issue with using way points and single lines is just that everyone is in the same line, you can design an algorithm for each group of creeps that makes them walk in a certain formation along a line toward a waypoint.

Alternatively, you could use a NavMesh, but that isn't necessarily required, and could get performance intensive with lots and lots of agents depending on your game; especially if you're planning on using mobile platforms.

Bilal Itani
  • 181
  • 9