Engine: Games Fundamental Classes (GFC) Library provided by Kingston University
Programming Tool: Visual Studio
Role: Designer & Programmer
Team size: 1
Development Time: 2 ½ months
"Sheep, Dog & Wolf" is a single-player game that focuses on the behavioural algorithms associated with boids to simulate a real-world situation in which a wolf (the player) is hunting sheep (the boids) whilst being chased by an AI agent that is trying to protect the sheep (the dog).
Develop a compelling game using all the principles of boids with some additional AI
Catch all the sheep before the dog catches you
Investigate the principles used for boids and rabbitology principles for AI in a game setting
For this assignment, we were given the option to investigate either A* pathfinding algorithms or boidlets. I was one of the few students to choose boidlets, most likely because more teaching time had been given to A* pathfinding than to boids. To display my understanding of boids, I created a small game that makes heavy use of them.
For the design, I took inspiration from an old PlayStation 1 game that I used to love playing which was from the Looney Tunes franchise. Since this was going to be using 2D boids, I knew I only needed to find suitable 2D artwork that I could use in this project. Once I found the artwork, I set about implementing the boids behaviours first. Before adding in the code to handle the separation behaviour, I needed to add in the player - i.e., the reason why the boids would separate. Lastly, the sheepdog was added in to give a sense of urgency and challenge for whoever was playing.All characters can traverse the game world from one side of the screen to another, including the sheepdog, to make the game feel less confining in a window. Catching all the sheep or being caught by the sheepdog ends the game.
Code for alignment, cohesion and separation have been implemented for the boids in addition to code that forces boids to separate when the player enters their range. This covers all the main elements that make up boids. For the sheepdog chasing the player, rabbitology principles were used to mimic the behaviour of a predator. The dog will follow the player and adjust its velocity smoothly as it turns to face the player, even when traversing across the borders of the screen.