top of page

In Sheep's Clothing

ROLE

AI Programmer and Game Designer

DESCRIPTION

Wolves have impersonated your livestock and you must determine which sheep are actually wolves by using your trusty dog or sniper rifle. Find them all before your livestock is killed or before you run out of ammo. 

In Sheep's Clothing is a 2022 game jam submission for the Global Game Jam, where the theme was Duality. I developed this game with another programmer and four artists in Unity3D.

DEVELOPMENT YEAR

2022

GENRE

First Person Shooter, Deduction, Strategy

PLATFORM

Windows PC

Unity_Technologies_logo.svg.png
Csharp_Logo.png

AI DESIGN

Sheep Design

Unity's Navmesh system is used to suplement pathfinding given the short time frame of a game jam. Sheep are using a simple statemachine which ossiate between the IDLE and a MOVING states.

Sheep are added to a flock container which provideds target positions when sheep enter the MOVING State. A target position uses randomly generated distance and direction from the average position of the flock.

flock.png

The sheep will move to the target position which will cause the flock's average position to occilate. Flocks can also add wolves dynamically to share position information while the game is running.

Wolves Design

Wolves are using an extended version of the sheep's behaviour, where their statemachine are comprised of: IDLE, MOVING ACTING and HUNTING states. In the wolve's ACTING state, each wolf will use the sheep's statemachine, switching between IDLE and MOVING, to appear like a sheep. 

Wolf behaviour changes once it detects the player is not watching them. An unobserved wolf will start their agression timer and start moving towards the nearest flock. Once the agression reaches zero, they will enter the HUNTING state. 

In the HUNTING state, the wolf will use Unity's pathfinding to move towards the nearest sheep to kill them. If at any time the player was to observe a HUNTING wolf, they will imediately enter the ACTING state temporarily until they are no longer observed. 

Lastly if the player either runs out of bullets or revealed the identity of the wolf using their dog compainion, the wolf  will enter a 'berserk' mode. In this mode, their agression timer is started with shorter time and they can no longer enter the ACTING state. 

Dog Design

The dog strictly uses Unity Pathfinding and doesn't have it's own statemachine. The dog is created by the player's input, and will path from the player's current position to the target position. Once the dog is at the target position, it will constantly check for a nearby wolves until a patentce timer is completed.

 

If a wolf was found, the dog will bark and follow the wolf for the remainder of the patients timer. Once the patences timer has completed, the dog will return to the player's current position.

bottom of page