This week following the milestone was assessing some of the problems we felt had cropped up including the Wolf being able to slow the spiders, I discussed this last week and talked about how I was going to replace it with function that would make the Spiders back off to a location based on the Wolf’s location. I have begun implementing this behaviour during this week and I am refining it to work correctly but the core functionality is ready. The difficulty for this comes with finding a position in the Navmesh that is in the opposite direction to the wolf.
Secondly Bradley felt that the Squad Manager could do with some optimisations so he put together a struct in C++ and asked me to implement it and optimise the code. I took on this task and I have struggled with trying to reduce the complexity of the code within the time frame we have available but I feel I’ve been able to make it a little simpler.
This code allows us to reuse the same collections over and over to help cut down on creating different Array’s to store data at runtime. We can store a list of spiders, store the squad’s leader and we can also store a lot more within this one data structure allowing us to keep squad information in a single place.
finally this week I worked on allowing the small spiders to retreat to a chosen point at runtime when they’re no longer part of a squad, this allows us to add an interesting behaviour to the spiders to run away and it also allows us to clean them up when they’re out of view.
Overall due to the time the optimisations have taken I haven’t gotten a lot more done this week but I have been given my task list from now until the end of the project and will now be moving onto the Boss mechanics and wildlife AI behaviours.
Thanks for reading!