Post news RSS Ai Obstacle Avoidance & A-Star Pathfinding

This article is based on an open-source demo originally created by David Ang in XNA 3.1 I have successfully updated the demo to XNA 4.0. This is a simple example of how one could implement obstacle avoidance using steering behaviors and path navigation using A* in a tower defense like game.

Posted by on


bandicam 2023 02 12 06 27 27 071

Originally created by David Ang, this demo showcases a tower defense game where entities (spiders and marines) try to reach a destination (blue fiery portal) while avoiding obstacles using either steering behavior (spiders) or A* (marines) pathfinding. Tanks have been added as towers that rotate to face the furthest entity within its range. Particle effects are utilized to show starting points and destination points. This demo outlines the code for the entities avoiding obstacles with a bounding sphere and finding a path using A*. This 3D sample also implements particle systems defined by XML files loaded with the Content Pipeline. The XNA 3.1 demo can be found HERE

bandicam 2023 02 12 06 27 49 882




Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.