As my project is finishing this week I've decided to go back over all the work I have done on the project to evaluate myself looking at what I have done and what I would have done differently knowing how the project turned out. I think this is an important to do to help me improve in the future.
What did I want to achieve?
When starting this project I wanted to create an artificial character inside of the Unity3D game engine using the JavaScript programming language. The AI was meant to be able to react to see the player if you moved into its line of site as well as hearing footsteps made by the player. Once detected the AI would begin to path towards the player. The code should be kept neatly with key elements commented and be efficient where possible so that anyone viewing the code would be able to know what is going on.
What changed with my project?
Over the course of my project not too much had changed from what I originally planned to do. The biggest things that I changed on my project was that instead of using JavaScript to program the AI I changed to using C#. I did this after having a meeting with Chris and we spoke about how my project will look from an employers perspective. He mentioned that a lot of employers would rather see my ability to program in C# and that it would greatly benefit my project to change languages. The only other things that I did change was that I added additional work to my project as I was ahead of my milestones. I decided to create the attacking mechanics for the AI and creating my own pathfinding algorithm. I created my own pathfinding algorithm after having a meeting with Chris and we discussed how showing that I have an understanding of algorithms like A* will have a positive effect on my portfolio. The attacking mechanics that I planned to add changed how they worked quite a bit throughout the project as porting my project to C# and creating my algorithm took up the time that I initially planned on working on the attacking mechanics.
What went well?
The main thing that I think we well on my project was that I worked consistently on it every week (Except from the 2 weeks over Christmas break). Putting this much time into the project meant that not only did I achieve everything that I originally planned to do but I was also able to create new features that I had not planned to do. I think that if I had done less work on my project it would have had a big impact on the quality of my work as well. Another thing that I liked about my project was that it gave me a good opportunity to show my programming ability as well as learn new techniques which I will be able to use on different projects that I work on after University.
What didn't go well?
I think the biggest problem with my project was that I had under-scoped what I was going to do. This was because when I originally created my project proposal I had never created an AI character like this for a game. As I was also using a lot of new skills and techniques I didn't think I would learn them as quickly as I did and surprised myself with what I could do. If I was to start my project again I would defiantly push myself more at the start to learn even more advanced tools (For example using a more advanced state machine) as I think that if I put the time into learning these harder tools I would be able to.
Summary
Overall I think my project went really well and I am happy with the final product that I have created. I will be looking to take this AI character that I have created and will be using it in projects that I plan on doing once I finish University. I think the final product shows my ability to program as well as working in an efficient and tidy manager which is something that I had originally set out to do.
Wednesday, 3 May 2017
Final bug fixing
For this weeks work I went though the feedback that I received from my play testing last week and tried to improve and fix as many of the problems that was mentioned by my play testers.
The fixes that I made were:
The fixes that I made were:
- The AI can now wait before transitioning between waypoints.
- Player no longer colliders with the AIs ragdoll body.
- Recreated the test scenes and added a menu. This allows for easier testing of the AI.
- Added controls to the menu.
- Player is now able to crouch when pushing left control. This makes no noise and allows them to sneak up very close to the AI.
- Hearing is now less sensitive so you need to be closer to alert the AI.
- AI raycast for sight has been adjusted. Previously it aimed down slightly. This meant the AI was unable to see the player when it should be in sight.
- AI loses alert status quicker.
- Fixed another bug with the AI sight. AIs position variable wasn't setting correctly causing the raycast to sometimes shoot from several meters below the AI.
- Changed AI viewcone sizes. (Previously was a bit too small).
All of these adjustments have been made to further polish the AIs mechanics and to create a better experience when playing in a scene with it. Something that I have tried to keep in mind this week was something a play tester said about how would to AI feel if it was to be used in an actual game. This is something I originally mentioned when I started this project was that I would like to be to use the AI in a game if I wanted.
After doing all of these adjustments I have gone back over my code making sure that it is as efficient as I can make it, my code has been commented and is easy to read. This was one of the main reasons that I decided to undertake AI as my project as I wanted to show to a potential employer that I can work in a neat and efficient manor.
Something that I have tried to fix but was unable to get working was having the AI rotate faster. The AI currently can be led round in a circle with it unable to turn as quick as the player. I tired increasing the speed on the navMeshAgent component however this did not fix it. I have looked through the code as well but was unable to find anything that is effecting this.
My next blog post will most likely be my final blog post on this project. I will be evaluating my project looking at what I have created, what I think went well, what I think could have been improved and discussing the changes that I made throughout the course of my project. I think that it is import for me to evaluate myself like this to help find areas that I can improve on when working on other projects.
Something that I have tried to fix but was unable to get working was having the AI rotate faster. The AI currently can be led round in a circle with it unable to turn as quick as the player. I tired increasing the speed on the navMeshAgent component however this did not fix it. I have looked through the code as well but was unable to find anything that is effecting this.
My next blog post will most likely be my final blog post on this project. I will be evaluating my project looking at what I have created, what I think went well, what I think could have been improved and discussing the changes that I made throughout the course of my project. I think that it is import for me to evaluate myself like this to help find areas that I can improve on when working on other projects.
I have uploaded the last changes to my GitHub page which can be found here: https://github.com/ABurton96/GameAI
Subscribe to:
Comments (Atom)