For this weeks work I looked at testing my AI in more advanced
scenes to see how it managed with pathing and reacting to the player in these more complex scenes. I
started by creating a scene with a maze along with stairs at different heights.
The AI managed to path between all the objects and handle the different heights fine.
Having moved the sight raycast from feet height to eyeline has greatly improved
the AIs sight. I decided to remove the code that handle the AIs attack for now.
This was because it was causing a few problems and was making it hard for me to
test some of the other AIs features. I've changed it so that the AI will now run and stand next to the player
instead of attempting to shoot him. I may look at adding the ability to attack
back depending on time over the next few weeks.
After I had tested the scene I then tried adding multiple
different AI into the scene to see how they work together and how it impacts
performance. The AI worked well together however something that I overlooked
when creating my A* algorithm is that the node grid is generated in the same
script that generates the path. This means that each AI needs the script
attached to it so a node grid is being generated for each AI in the scene.
Although this didn't cause too many performance issues with only a handful of
AI this is still something I want to change as I do want the AI to be as
efficient as I can make it.
Next week I will look into changing my algorithm so that it is more efficient with multiple AI in the scene. I will also be doing additional playtesting to see if I can find any other problems with my code. Depending on how long these previous tasks take I might look at redoing the AIs attacking mechanics.
No comments:
Post a Comment