Go Directly To

Halloween Hunt is a game about children playing hide and seek in a playground during Halloween.
The goal for the player is to have the most candy at the end of the game

Data:

  • Platform
    • PC
    • Controllers
  • Genre
    • Local co-op
    • Capture the flag
  • Time
    • Project: February 2015 - april 2015
    • Personal: February 2015 - april 2015
  • Team
    • Team project wings
    • 6 members during whole production cycle

General

For Halloween hunt I made the AI seeker, which fully reacts to the players behavior.
The players pitch against each other to get the most candy (points), and each time they are caught by the seeker, they lose 1 candy
It starts by walking to a random side of the level, at that location looks around, and follows the player.
It's fully event based, meaning the only thing it will do on tick is walk towards a goal destination. everything else, including what this destination is, is calculated on events
This made it a really optimized AI, while it still is a really realistic seeker.

Idle

While the seeker has no known player it follows, he will go to random locations in the level.
There are 8 checkpoints located in the level, each with different rotators the seeker will look towards.
At reaching one of those locations, a event is fired to choose a new location
The event for going to a idle location is called every-time the seeker reaches his goal, and no other mode is fired in the meantime

Seen player

The seeker has a vision cone which checks once a second for players in sight
When a player is seen, a event is fired for going to an active way-point, this overwrites the idle behavior and makes the AI go to the location he sees the player.
When the seeker is going to the location it last saw a player, it will check twice a second for still seeing the player, and update the active way-point accordingly. Making him keep track of the player, but also able to lose sight.

Heard Sound

To make it a bit harder for players, of to lure the seeker into another player, The player makes a sound when picking up a candy, which lures the seeker to that location.
This event is only fired if the AI doesn't already have a player in his sight. Which makes it possible to get candy without getting the seeker following you in some cases.