Daan van de Ven

Rat Trap Cartel

24 Days – 10 Members – Gameplay & AI Programmer - Unreal Engine 4.19

Project Info

Project Summary

Made with Unreal Engine 4.19

This project had a focus on working with a big team, this was the first time working with a large team as well as working with multi-disciplinary teams. I started working very closely with designers and some of the artists

Released on itch.io

Team Composition

2 Programmers
5 Artists
5 Designers

Duration

1 Block – 8 Weeks – 24 Project Days

June 2018 – July 2018

Project Goals

For the project we set out to recreate an arcade game from the 80s or earlier, we decided upon using Pengo as out base and turning it into a mob style game.

The project set out to use high quality audio assets and use them in a way to enhance the players experience.

My Contributions

Role: AI Programmer

During the project I focused on setting up a AI base for the project and improving on it.

I worked with basic AI components in Unreal Engine 4 and it was my first real time working with AI I had not done much AI before this point I focused on making the enemies run away from the player and the objects around the player.

I worked on the AI for one of our characters the Alligator which had a much different design, running away towards manholes from the player then reappearing out of manholes further from the player in an attempt to get away.

Role: Audio Programmer

I worked with Tim Wondergem on audio implementation within Unreal Engine 4.

For the audio I focused on getting triggers and events setup that would fire when needed so audio could be easily hooked up to those events, I worked with C++ to create the triggers and fire them when needed.

Taunting (C++)

Inside the main agent actor class, I wanted to have taunt events be sent from the actor to blueprints so that audio could easily be hooked up to that.

I started by exposing two variables a minimum timer value and a maximum timer value, at the start I would set the timer to the default taunt variable which was also exposed.

After the taunt timer was complete it would select a random time between the min and max time for taunts and wait that amount of time before taunting again.

I did this mainly for the one level where we had multiple AI actors within the scene so they wouldn’t not consonantly speak over each other or at the same time.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
void AAgentCharacter::BeginPlay()
{
    Super::BeginPlay();
   
    tauntTimer = tauntTimerStart;
   
    UCharacterMovementComponent* characterMovement = GetCharacterMovement();
    characterMovement->maxWalkSpeed = moveSpeed;
   
    if (blockManager ==  nullptr)
    {
        blockManager = StaticUtils::GetBlockManager(GetWorld());
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
void AAgentCharacter::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
    if (debugDraw)
    {
        DrawDebugLine(GetWorld(), GetActorLocation(), targetLocation, FColor::Blue,
            false, -1.0f, 0, lineWidth * 2);
    }

    tauntTimer -= DeltaTime;
    if (tauntTimer <= 0)
    {
        Taunt();
        tauntTimer = FMath::RandRange(tauntTimerMin, tauntTimerMax);
        UE_LOG(LogTemp, Warning, TEXT("TauntCall"));
    }
}