Sunday, 17 April 2016

Coding - AI Final Iteration - John Howard

Task
Redo all scripts and then sort out the navmeshagent to animator movement.

Step One - NonMovement Scripts
This stage was just refactor of all non-movement code. And resetup of the animator to allow combat and idle animations to be called. Comments and redundant code were mostly removed and better bools setup.


Golem Animator

Step Two - Movement and Animation
This stage was the hardest part. I basically wanted to get the charge working with the navmesh and animator. So I decided to set up an entirely new script that would control the animation values taken from the nav. I found I also had to turn this off at certain points to stop he golem going to far. This is less than ideal but it works. I shall have to develop this further after this project. But for now it works and enables gameplay.

Final Steps and Thoughts
The final setup was to get the the new nav values working with the search and other functions. These didn't take too long to set up. The AI is now working great. All parts are doing as they should and i'm impressed with where I am from where I started. This last iteration is so much better than the first. And whilst there are many areas I could improve upon that is only because I have learnt more whilst doing this first setup. I plan to take this AI and recode it again to work in my third year final game. The AI setup took a lot longer than I thought but i'm glad I did a last iteration to work out as many bugs as possible. And although I had to setup my own player scripts to test it I feel this is a strong set of code.





No comments:

Post a Comment