tower defense type game AI

BlitzMax Forums/BlitzMax Programming/tower defense type game AI

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1. Use a virtual grid (-> equidistant path nodes in grid style)
2. Calcualte a path on the empty route
3. Whenever a tower is placed, check if it intersects with the current path for the mobs. If so, recalculate it for the distance that the tower "cut".
4. you might apply a smoothing algorithm afterwards to make sure they don't run straight up to the tower and "move around it" if they could have approached it with a slightly different path before


As the path can only change when a tower is placed, this is a very simple, yet cpu time saving way ...