A downloadable prototype for Windows

The Game

Pigpal is a small prototype friendly AI, an animal companion character that would accompany the PC in a larger scale game. 

The Code

The images below show the behaviour tree, some of the c++ tasks created for the tree, and the animation blueprint. The full repository can be found here.

Behaviour Tree

Pal's behaviour tree always checks for any commands from the player (set by gameplay tags) that override any other tasks. If not under command, pal stays by the player character unless an enemy comes into view, in which case pal prioritises attacking.

Attack Task

Once an enemy has been identified, it's added to the blackboard. This task sets pal as in attack mode (used by the animation blueprint) and makes an attack against the enemy.  The task returns a failure when the enemy is killed so that the attack sequence node on the behaviour tree is ended, otherwise pal will continue to attack.

Animation Blueprint 

If pal isn't under specific command or attacking, the animation blueprint uses a basic blend space that includes idle, walking, running, and turning animations. A separate blend space is used for the foraging command. State machines control the animations for waiting (in which  pal lies down and stands back up when called to return) and attacking.

Download

Download
https://drive.google.com/file/d/16g6xXNvDl8z3-0Na7oupRFQHWt1i-KQV/view?usp=sharing
External

Leave a comment

Log in with itch.io to leave a comment.