For my Artifical Intelligence class, we were given the freedom to do an extra credit project where we would implement some of the concepts we learned in class to our own demo. This was an excellent opportunity to go back to my favorite project, Halo: Flooded.
The Problem
Halo: Flooded required some fairly complex pathing, and I wasn’t exposed to it at the time. If you have played the original version, you will notice enemies would have a hard time pathing to certain areas, and if you make it far enough into the game, it will usually lag due to the inefficent pathing algorithm I wrote. You can actually see the problem in the screenshot below.

I was getting 33fps with over 200 enemies pathing (not realistic gameplay conditions). On top of that enemies weren’t even pathing to the basement specifically.
How I fixed it
I rewrote my pathing algorithm to use an A* algorithm. I already had a waypoint system in place so those became the "PathNodes". After finishing my A* implementation, the enemies are able to path to the basement, and my FPS increased by over 300%! The results can be seen in the next image.

Afterwards, I did testing to see if the AI was more playable now. I noticed that my enemies were still having some issues pathing, and it was due to some doors in my game needing to be opened. I changed the waypoint system to support edges that are added when those doors are opened. Check out the following image to see the problem exactly, I will explain the parts of the image next.
If you take a look at the above image, you will notice the blue path where enemies enter. From there they used to try to take the red path to get to the basement, but failed and ended up getting bunched up where I marked the "1". After fixing this, enemies take the longer green path, because they do not know about the path through the door until the player opens it.
Overall, I am glad I was given the opportunity to reflect back on this project, and apply some new knowledge to it.
Check out the original Halo: Flooded post for more info and downloads.






