Unidad Moribunda was an FPS video game in that I primarily developed both the scripting systems and artwork. The Zombie AI System was part of a broader AI system that differentiated between several “living” entities that could potentially attack, be targeted, and die.
I created an inheritance hierarchy in C# where the Base class was the “Target” and basically represented any entity in the game that could potentially die. The Zombie AI inherited from this class and added functionality for all the different Functional State Machine (FSM) states. From these states, we had three categories: 1) whether the zombie was aware or not, 2) what activity he was doing, and 3) the speed at which he could displace himself.
The rest of the code handled how the Zombie could change states and the actions he would do at each state. Essentially, the stealth mechanics revolved around the Zombie perceiving the player (based on distance, noise, or other phenomena), which would automatically make it chase, and attack the player.
Other behaviors included random wandering and eating, and the ability for it to become stunned depending on the weapon’s stun factor with which it was attacked. This temporarily made it play the “stun” animation (which was 4-directional depending on where it was hit) and disabled all other actions until it could regain awareness (which was based on time). Random Wandering would detect random points in the pathfinding area for it to “move towards” in a slow, zombie-like fashion, similar to how they look in the movies.