Hey Folks,
So here we are, the final devlog on Monster AI, and release is just around the corner. If you haven’t follow It Will Find you yet, make sure you do for updates on the game, and to jump in at launch!
With doors finished the last thing left to do it discuss some of the other elements that went into allowing the creature to vary its interaction patterns and create more engaging gameplay.
With the monster’s new improved ability to pursue the player in a more immersive way, I had to ensure that the creature would be an omnipresent threat to the player to maintain tension and encourage progression. My solution to this came in two distinct components, a scent tracking system, and a distance based relocator.
The scent tracking system was inspired by a similar mechanic I had developed during a previous project, where an object would follow the exact path left by a player. In this instance I created an invisible collider that would follow the players path after a delay by creating an array of Vector3 points as the player moved which it could then replicate. This collider could then interact with the creature should they cross paths and trigger a “tracking” state which would allow the monster to follow the scent object until it was within a set distance of the player, at which point it would begin to search for the player in an alert state. This meant the player had to be careful with how they moved around the creature and gave the monster another tool with which to track the player around the map. As the player became more injured or coated with other scent-based effects, the range of the collider could then increase, drawing the monster in from further afield and creating a more present sense of danger.
The distance based relocator was a failsafe to ensure that the creature was never so far from the player that it was no longer a threat. Using the Vector3.Distance method I had previously instituted in the AI, the monster would sense if it was too far from the players location, and then pick a random point around the players current location to move to. This allowed it to move to the players general location without directly moving to them, giving the sense it was tracking the player rather than simply adjusting to follow them.
As the monster’s toolkit expanded, the player needed an option to defend themselves, especially at low health, and so a ‘retreat’ state was added for situations where the monster was injured by the player, either by being shot or by an explosion. This would simply turn off its ability to attack and force it to rapidly move to a location within the Unit Sphere that was at least 50 units away, giving the sense that it was fleeing to recoup itself and giving the player some breathing room.
The final addition to the monster’s core behaviour was an aggression meter that operated in a similar manner to Julia’s Agitation meter. As events unfold, and the player interacts with the creature, the monster’s aggression increases, making it faster, better at tracking, and reducing the radius in which it will hunt for the player after a chase, making escape more difficult. The Aggression value also reduces the chance required to smash doors, making it harder to hide from, or delay the monster’s passage within the house. The value was again increased by static values during certain events and increased over time during chases by a set value that ticked over for each second the creature was following the player. These values were adjusted according to tester feedback to ensure the creature did not become a source of frustration.
The aggression meter helped the creature to become a part of the reactive narrative, as its behaviour matches the intensity of the story, reacting to how the player treated it in a visual manner. Rather than it following a set of static rules, it allowed the creature to create more paths with the increased chance to smash doors, and makes it somewhat unpredictable to gauge how quickly it will find you. This makes later segments of the game much more intense as a result, especially when the player may be low on health.
And that’s it, we’re done, the Ai section is complete! I hope that provided you insight into how the initial AI was created for it Will Find You, and gave you an idea of what to expect with the creature.
Next time we’ll be reminiscing about the development process, and gearing up for launch!
Until then,
Nick
0 comments