The ants go marching…
I’m feeling good about the pathfinding implementation we’ve got running for Tank Frenzy. In our AI proof-of-concept, pathfinding was horribly slow (although it wasn’t designed for speed in the first place). Therefore, our pathfinding in the real game has been heavily optimized: The terrain heightmap is used to construct a nav mesh consisting of quads (the colored regions in the screenshot), which we run A* on. Performance is much improved: it took 3-4 seconds for one unit to path on our demo 192×192 terrain; now, pathing is unnoticeable on an 1800×1800 terrain. Even when 50 units spawn & path at once, the performance hit is only ~1/4 sec. (and we’ll just avoid doing that).
There are some issues left: navigating on a mesh is more complicated than pathing on simple waypoints. We’re going to need some sort of string-pulling alg. to clean up the generated paths.

Post a Comment