We’re currently working on a co-op horror game at Biogore Interactive, and a core tenet from very early on is that we want the world to feel alive. To do this we ended up using utility-driven AI. Utility theory is a theory that every action has utility, or value. This utility is determined by almost everything you experience in real life, but in the case of our monsters it’s determined by several basic factors which combine together to create a life-like horror creature. These are:
– Three needs. Hunger, sadism (the need to hurt and stalk players, with intent to cause pain rather than outright death), and bloodlust.
– Several other thoughts relating to fear and opportunism (Are the players grouped together? Is one player straggling behind? Are the players acting threatening and making loud noise, or are they injured and limping?)
The monster’s hunger can be fulfilled by eating various procedurally grown, Cronenbergian mutated-plants and horrifying growths (I’d like to talk about those in a future post), and they leave trails of decay in their wake. This allows the player to track the monsters and see hotspots of monster activity that they may want to actively avoid.
Because our AI uses a utility scoring method driven by the processes outlined above, we can also have it fake learning and evolution of thought very easily. We do this by forcing it to choose less utility-efficient options the lower its evolution score is, and increasing the evolution score as it feeds. Additionally we lower the weights of thoughts relating to fear and sadism while increasing ones related to bloodlust, and increase the rate at which the creatures bloodlust grows (especially when it spends time chasing the player). As a creature learns more about the player it therefore acts more ruthlessly, with less fear and greater intent to massacre.
This evolution system combines with Unreal’s dynamic materials to allow the monster’s evolution level to change not only how it acts, but also how it looks. Vertex paint read from the shader can be used to grow spikes and increase bone mass of the monster as it grows, in addition to simpler changes such as modifying the monster’s color and textures.