Wolf's Den

Wolfs Den is a visual studio game project I created using AI steering behaviours in C++ using the framework of a custom game engine called XEngine. Within the game there is a wolf and multiple sheep wandering around. When a sheep's detection radius gets close enough to the wolf it will change its state to fleeing and have the wolf as an obstacle avoidance making sure it tries its best to never collide with the wolf, on the other side if a wolf's detection circle captures a sheep it will then change its state behavior to seeking. After a certain amount of wandering or fleeing for the sheep they become hungry and within the center of the game are wheat they will then seek towards the wheat to try and replenish their energy. This is accomplished by using a state design pattern where the entity has a pointer to its current state; this pointer allows the entity to change its state. To control specific behavior of when the entity enters the state, while the entity is in that certain state and what happens when the entity leaves that state. The state holds a pointer to the entities which is what manipulates the wolf or sheep's behavior.