Keith’s Carnage

Role
Gameplay/AI Programmer

Tech
Unreal Engine 5

Start date
July 2023

Duration
48 Hours

Responsibilities

  • Creation of Keith’s brain, our stealth-detection AI
  • Research and implement the new StateTree plugin that comes with UE5
    • Customizable patrol points and sets
  • Developed tools for level design that:
    • sets customizable patrol points and sets throughout the level
    • that call Keith in and out of existence
    • and set active patrol sets at certain levels of progression
  • Created the intro and mid-level cutscenes/cinematics
  • Developed the checkpoint system
Keith’s StateTree

From patrolling and investigating noises that the player makes, Keith always acts based on this StateTree.

I developed varying StateTreeTasks based on our needs. Idling, patrolling, investigating, being stunned, chasing, and attacking were my main responsibilities.

Keith’s seeing and hearing are based on the PawnSensing component.

Certain tasks have variables exposed that can be set from the StateTree directly. Designers were able to directly alter these values without my presence. Freeing me up to work on other tasks.

All tasks developed during this game jam. Some went unused.

Cutscenes/Cinematics

With some time left, we wanted to up the presentation. In order to achieve this we decided to add an intro and midlevel cutscene showcasing Keith’s Carnage and introducing Keith’s ideals to the player.

I took responsibility for these scenes. By utilizing the LevelSequencer, I created two cutscenes utilizing existing player animations.

This first cutscene plays immediately after starting the game.

This next one plays right before your first encounter with Keith.

Patrol paths and sets

As Keith is exploring this dungeon we have given Keith the brains to decide where and when to walk.

The below screenshot demonstrates the main two encounters, many patrol paths residing in different sets. Custom tools for the level design had been created to call Keith in and out of existence and set the active patrol set to patrol on.

Checkpoint system

Keith’s Carnage is unrelenting and the player will most likely be caught a couple of times. Having the player restart the entire level would get frustrating. Here is where the checkpoint system comes in.

In the below screenshot, you’ll see one such checkpoint. Once the player overlaps with its trigger, its PlayerController will receive new respawn transform data. Once the player gets caught by Keith, its PlayerController takes care of the rest.

Certain LevelSequences dictating the state of the game might need to be reset, the checkpoint system also takes care of that.