top of page

CRITTER QUEST

Critter Quest is a puzzle prototype, and an exercise in AI design/programming and implementation of Wwise in Unreal Engine.

​

The base mechanic is watching a group of 4-5 ravens, who are each exhibiting a behavior pattern, and picking the odd one out of the group. Each of the 3 behaviors - cawing, idling, and flying - have one normal animation and one variant animation. For more of a challenge, each raven picks a variation in one of the three categories; however, the odd one out picks 2 categories to use the variation.

He's not doing much right now, but he's doing it spectacularly.

(Art assets from here)

The AI is being implemented using UE 5's experimental new StateTree plugin, rather than the traditional BehavioralTrees. In truth it's because I understand state machines more than the flow of the different behavioral trees, though in future iterations with different animals, I'd like to use the BTs to get the experience for it.

​

Currently it's just the Wait and Idle states that have been implemented with the StateTree, associated tasks/conditions, and the (instanced) raven blueprint. The last step to a holistic AI state at runtime will be integrating the animation blueprint, which I'll do using a StateTree Evaluator and the usual booleans being adjusted within the raven blueprint.

The StateTree task for the Idle condition, i.e. STT_Idle, has logic as shown below. Using Delta Time and a modulus operator, a boolean is set to decide between the two different variations. This will be changed to seeding a random stream in either an evaluator or the raven blueprint, and then randomizing on construction rather than randomizing every time; this way, it can save the randomized animation per each raven as well.

​

The Idle boolean is set to true at the end of the Root or Wait task, which allows the state to be entered. (Ultimately, the state is determined randomly as well during the aforementioned task, and the respective boolean is enabled.) Then, the boolean is disabled on the ExitState, as shown below on the right.

Here's what the StateTree blueprint looks like, as well as my current layout. Idle is a nice skeleton for what I'll be using for the other two crow behaviors; the enter and exit conditions, shown on the left, evaluate the Idle boolean within the AI blueprint to dictate if it can enter or leave the state.

Below is the current task for the Wait state, which is used to generate a random time between 1-5 seconds to wait between moving to a new state. This is done using the random stream method mentioned above, adding the start time and current time together, and waiting for it to surpass the randomly generated seconds made from a random stream seeded - yet again - using delta time.

© 2035 by Clarice Elso. Powered and secured by Wix

bottom of page