Zombie Tutorial
During this tutorial I was introduced to basic movement AI navigation in Unity, this week I completed all sections (green, orange & red).
I began by importing the standard assets into the scene and then setting up an environment, which consisted of a quad and some cubes which would later act as obstacles to test the nav mesh agent. It is important that I select these objects and make them “navigation static” this is self-explanatory but it just makes sure that in no way that it can be moved by things such as physics forces so it will effectively “never move”. Also I looked at changing the parameters of the bake to best suit my environment, however the default options were already perfect for this simple environment as it is just a flat area with simple geometry obstacles.
Next, I added two characters to my scene; Third person controller and AI third person controller. I then attached the main camera to the third person controller by making it a child, this would ensure that the camera follows the player always when navigating around the environment.

For the AI third person controller I placed it in the way of a few obstacles to test the AI could work correctly and as intended. Next, I created an empty game object (which only has a transform position) and placed this into the “target” part of the AI character control script, this is used to make the AI walk from its starting location to its desired location. Having tested this with several different variations of obstacles in the way I know that this is working correctly.
Finally, I decided to change the AI’s target position with a script; I thought this was important to learn as this is the same way click to move isometric games work. The way I achieved this was by using the same concept of before (by having a target) but instead of using a game object which would clog up the hierarchy. I would use a ray cast from the camera to mouse position which would return a vector transformation which can be used by the AI, whenever the player would left click somewhere then that position would be set to the target position for the AI, resulting in good solid movement of the AI using mouse clicks.

Lab 1
Predator Prey – This works by having a rigid hill terrain and the AI is a large group of NPC’s using the flocking method this simulates herd animals such as “sheep”. They wander round as a group which provides more realism. The other AI acts as a “Wolf” and also wanders around until a sheep comes into range then chases it and kills it. While the rest of the sheep flee and reform and flock together.
Body Guards – This AI is used for a protection scenario, the AI (3 NPCS) follows the player in a triangle formation while looking outwards from the player. They then also rotate to look at / point gun at 5 different points which makes it look like they are on guard.
Also as the player moves so does the AI constantly adjust their position to stay in this formation, I believe the AI’s position is worked out by using an offset from the players position and fixing that so it cannot change, this makes sure they always maintain their formation.
Left 4 Dead 2

I have spent many hours playing this game and have always noticed that every time I play the experience navigating through the environment is always different, I never find that the same enemies are placed in the same location and hordes, special zombies etc. always seem very dynamic. Having read interviews from AI directors from Left 4 Dead it was mentioned that they focused heavily on managing the pace, it builds up to the intensity until it peaks and a horde arrives, then eases off, this build up and ease off is repeated throughout the level as players get to exit. It does this by modelling stress levels in players (affected by things like; zombies in proximity, health levels, ammo and close vs ranged combat), once monitored the system adjusts how the zombies attack like where they come from, how many attack and which types.

The hoard system adds a lot of more dynamics in that players need to be ready at any time otherwise they run the risk of dying. However, once playing for a little time it is very easy to understand how to predict the hordes of zombies such as tunnelling into one small area which forces the zombies to funnel through and get killed very easily, I think start to realise that the zombies AI is quite dumb and lacks intelligence as it’s too easy for the player to predict how the zombies will act.