top of page

AI

While I was schooling, I did not have much opportunity to work with AI because I am usually tasked with programming the UI and gameplay mechanics. Hence this is a great chance for me to experiment and learn about UI coding.

Creating a smart AI can help greatly improve the gaming experience as it can help create a more immersive world by creating a more intelligent/realistic enemies to fight against and also have better companions/NPCs that you can interact with like with another human being.

One of the things that I have always wanted to do was to make a AI that is stealth orientated. Meaning its sight and vision based instead of being distance based like some games do. 

Vision based AI

So one of the things I decided to start working on is to make a vision based AI that can be easily adjusted by the designer but at the same time easy and reliable for the programmer to work on. 

Here, you can see the vision range and angle of the AI through the use of editor scripting. The line updates and adjust automatically as the designer changes the values to give accurate representation on how far and how wide the AI can see. They can also change the colour of the line through the colour picker so as to make it more visible on the background or colour code different enemies with different mechanics.

​

While the view angle is calculated off the direction of the gameobject itself, it can also be easily set to be dependent on which angle the head of the AI is facing. This is useful in situations where the vision is based off the head of the animation rather than the direction of the body, hence if the model was to have a "Look around" animation, instead of rotating the gameobject itself, it can see according to the direction of the head.  

Sound sensitive AI

As mentioned at the top of the page, one of the other thing that I wanted to work on is that the AI is sensitive to sounds. 

​

here is a Demo of a prototype that is working below.

As you can see, the AI goes towards the area where the rock have impacted and have made a sound, and at the end, when thrown too far, the AI does not react as they are not able to hear the sound at all. 

​

Again like every other code I've experimented with, the distance which the sound will affect the AI is easily adjustable and it makes use of 3D sounds in unity, meaning the volume of the sound will be softer the further the player is away from it. The code also takes this into account and adjust the distance of how far the sound can be heard by the player according to the value set by the designer on how far should the sound travel to. 

© 2016 by Tomoaki Itabashi. Proudly created with Wix.com

  • LinkedIn Clean Grey
bottom of page