Wednesday, February 15, 2023

86.) Ai Obstacle Avoidance & A-Star Pathfinding Behaviors


      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. David's original demo was created in XNA 3.1. I have successfully updated the source code to XNA 4.0 and made additional implementations. The sample originally utilized the Skinned Model Library but I've replaced it with an updated version of the XNAnimation Library. Doing so allowed me to resolve animation take issues within the spider model and support multiple animation clips within the same .fbx model file. 



     I look forward to expanding this inside the Cyclone Game Engine. Soon I plan to add additional particle effects and possibly a level editor. I have provided the source code to this demo below. 








No comments:

Post a Comment