Sunday, 19 March 2017

Adding A* to AI and meeting

For this weeks work I started by adding in my A* algorithm in place of the Unity navMesh on the AI script. I did this so I could test and see how well it works and see what changes I would need to make to get it to a usable state. After implementing the algorithm there were a few key things that I noticed that I needed to implement. These were the ability to move up/down stairs, generate nodes at different heights, rotate the AI to face where its walking and to smooth the path the AI takes when walking to each node. These are some additions that would greatly improve my algorithm.

After adding my algorithm to the AI script I decided to quickly tidy up the code for the AIs attacking mechanics. I decided to do this as it was half finished and was causing me a few small problems when working on the AI script. The code for this doesn't work perfectly but no longer causes me any problems when working on anything else now. I may come back at a later date to see what additional improvements I can make to this however it is not a priority.

After planning what I wanted to add I had a meeting with Chris to discuss my project. I had this meeting to decided if it was worth making these changes to my algorithm as even with these changes it is likely that Unity's built in navMesh will still be better than my version. We decided that I should continue to work on it and after making the small changes that I mentioned previously compare the two again. Even if the changes do not improve it to a stage that is as good as Unity's navMesh I will have a lot more experience and work to add to my CV. This is important as this was a key reason as to why I decided to do this project in the first place. We also discussed a few different ways that I could go about implementing these changes.

For next week I will be researching into how I can make the algorithm work for stairs, platforms at a different heights, having the AI rotate towards where it is walking and to smooth the path that the AI walks across. Once I have researched this I will begin adding these changes into my project.

No comments:

Post a Comment