theHunter: Call of the Wild – Designing Believable, Simulated Animal AI
Updated: Mar 16, 2019
This blog post was published with permission from Avalanche Studios.
INTRODUCTION - THE MOST REALISTIC HUNTING GAME EVER
Prior to working on theHunter: Call of the Wild, the closest I ever got to hunting was skeet shooting with relatives in the midwest (shooting at orange discs fired into the air).
I joined theHunter: CotW team because it provided an incredible opportunity to focus entirely on AI design. Now that the game has shipped, I want to take the time to write about some of the design considerations for the game (from an AI Design perspective), as some of what I learned may be useful to others who are designing game AI.
LEVELING UP MY HUNTING KNOWLEDGE
Despite knowing very little about hunting when I first came onto the project, I quickly became an expert in animal behavior across 10+ species.
It was critical to learn as much as I could about hunting and animal behavior, as theHunter franchise was created with the goal of being the “most realistic hunting games ever created.”
In fact, many fans of theHunter games are real-life hunters. This means that:
1. Players absolutely know when an animal behavior is off or when a species doesn’t reflect real-life.
2. Unlike FPS games (and arcade-style hunting games), players don’t immediately shoot everything that moves. In fact, they sometimes watch an animal (or group of animals) for a couple minutes or so, waiting for the perfect shot (or snapshot! – Some players play simply to enjoy the environments and take in-game pictures of the wildlife).
Therefore, players spend a ton of time observing the animals and their behaviors, making animal behavior a critical component in adding to the game’s believability.
AN OVERVIEW: WHAT DOES AN AI DESIGNER DO ANYWAY?
I came onto theHunter: CotW team just as a few animals made their way into the game but didn’t yet have any behaviors. I worked with team members across different disciplines (sound designers, animators, programmers, world artists, etc.) to ensure the AI matched the expectations of actual hunters, while also meshing well with gameplay.
I was tasked with:
1. Researching animal needs and behaviors.
2. Populating animal reserves, including:
a. Where species roamed, ate, slept, and drank
b. Designing herd size, gender composition of herds, animal schedules, etc.
3. Determining additional needs (such as habitats) for gameplay considerations.
4. Designing & implementing animal behaviors, while ensuring each species (including different deer types) were unique from each other.
A cool thing about Avalanche Studios is that their in-house engine – Apex Engine (the latest version of technology used in Mad Max and Just Cause 3) – includes proprietary behavior tree tech, allowing designers to implement AI behavior.
HOW DID AI DESIGN ENHANCE THE BELIEVABILITY OF ANIMAL BEHAVIOR?
Since the goal of theHunter franchise is to make the “most realistic hunting games ever created,” this means that a ton of research and prep work goes into creating new animal species, including all the nitty gritty details of their lives, such as:
1. POPULATION - HERD SIZE, GENDER COMPOSITION, ETC.
What does this mean to the game? Isn’t it enough to just throw in varied herd sizes and let the players have fun? – The answer is no, not at all. There are many subtleties and complexities of animal behavior that are reflected in the way animals “organize” themselves.
The following categories cover a few examples of this:
1A. SINGLE GENDER HERDS (in other words, large herds with the occasional lurking male)
Many deer live in single-gender herds most of the year, aside from a time period known as the rut (aka mating season).
I designed animal herds to reflect these largely single-gender herds, adding in the odd male or two within the easy-to-find female herds.
Why does this matter? Since hunters typically want to bag a buck (preferably a big buck), this encourages players to stop and survey animal herds in order to find a lurking male, rather than simply skipping over large female groups. In designing these herds, it became a personal goal of mine to incorporate enough randomness among male animals so that players would be pleasantly surprised when they finally did find a higher ranking male.
(Note that I mostly refer to deer groups throughout this blog post, but in actuality, many additional species were included at launch, including the European bison, red fox, wild boar and black bear. Each species, including different deer species, involved their own, in-depth research and design process.)
1B. SMALLER GROUPS OF MALES (mostly found in dense vegetation)
Through designing the herds and their home ranges (habitats), I ensured that smaller groups of males would be found primarily in dense forest areas. This not only makes them harder to find, but the dense vegetation – combined with their keen animal ears – makes it harder to sneak close to them and get a good shot.
1C. HIGHEST SCORING ANIMALS - OLDER MALES (with keen sense, in the densest vegetation)
Animal herds and home ranges were carefully designed in order to balance difficulty with animal senses and scoring of the animal – with large herds of lower ranking animals roaming the open valleys, ranging to the individual, highest scoring males in the toughest terrain on the reserves. I’ll go into this in more detail in my next point, “Habitat.”
At this point, I want to give a shout out to Björn Öjlert – Lead Designer on the team, designer on the original theHunter game, and a fantastic mentor during my time at Avalanche Studios! His experience from the first theHunter game and knowledge of what the community wanted to see, informed a lot of the design of theHunter: Call of the Wild, as he knew which design decisions (such as animal scoring) mattered most to players and what could be improved upon to set CotW apart.
We also met with the designers on the original theHunter team weekly to “talk shop” and stay up-to-date on new design decisions and animal species planned for the original game.
2. HABITAT - HOME RANGE SIZE, DIFFERENCES BETWEEN GENDER/AGE, ETC.
2A. THE RARITY & TOUGHER HUNTING GROUNDS OF HIGHER RANKING MALES
I touched upon this in the previous point, but it’s worth going into more detail. – I designed the habitat size and distribution for each species in the reserve, painting them with a tool in the engine.
After researching the population distribution of animals (and learning how significantly certain criteria, such as gender and age, impact home range size and habitat selection), I found it made the most sense, from a design standpoint, to make a new layer (as you might in Photoshop), specifically for higher ranking males. I overlapped the general population’s distribution map somewhat with the older males, but my primary goals for this were to:
- Give high ranking males a smaller home range. This means that players feel rewarded when they find a feeding or resting zone at higher elevations because a high ranking male is sure to be closeby! (Players tend to immediately crouch or go prone when they discover a high ranking male is in the vicinity, moving more cautiously to avoid detection.)
- Ensure these male home ranges were contained to areas with the densest vegetation, and thereby making it more difficult for players to get the upper hand.
Players inevitably make more noise in dense vegetation, and if they happen to be upwind of the animal, the animal will flee before the player realizes an animal was there in the first place. This makes higher scoring animals very difficult (and rewarding!), since higher scoring animal also have the keenest senses out of their entire species (such as the Red Deer, placed at one of the farthest away and most mountainous regions of the European reserve
2B. ENVIRONMENT CONSIDERATIONS & PITCH POINTS
Another aspect I thoroughly enjoyed designing was where the animals traveled, ate, slept, and drank. I worked with world artists to ensure animal reserves had enough water sources, feeding and resting areas (given the species’ typical home range size), as well as enough hills, and flatter areas surrounding the hills, to create pitch points. This was a critical gameplay consideration:
- The concept of pitch points was particularly interesting from a design standpoint. They’re basically the point in a FPS or tower defense game where you know enemies will bottleneck. This image from Bowhunting Magazine has a good depiction (and article!) of what a pitch point is and how hunters utilize them.
Generally, hunters set up a tree stand or hunting blind early in the morning near a pitch point so they’re ready when the animals come out to eat at dawn. They ensure line of sight to a good feeding ground and also ensure that the wind won’t work against them, carrying their scent toward the animals. Pitch points often form naturally at the valleys between hills and along water sources, providing an excellent point for hunters to wait for deer traveling between resting and feeding areas.
- As I designed animal roaming areas and “need zones” (eating, resting, and drinking locations), I had a lot of fun considering the areas of a map where the player might set up a hunting blind and wait for a herd of deer to come by. It’s pretty rewarding to see players actually utilizing these areas in the game!
- This video clip of a CotW player shows a player discovering one of these pitch points and enjoying the animal schedule aspect of the gameplay (described below).
It was critical to research and incorporate animal schedules to ensure animals traveled to eating, drinking, and resting areas at appropriate times. After all, it would look really strange to players if a nocturnal animal had the same schedule as a diurnal animal (mostly awake during the day). There is a certain degree of randomness to the schedules, but I also had to design them to ensure that there was always some movement in the reserve! Could you imagine an animal reserve that is supposed to be “teeming with life” but appears to be devoid of life…simply because all of the animals are sleeping at the same time?!
- Animal Schedules as a Mechanic – In fact, gameplay involves learning animal schedules and using them to your advantage. It’s a rewarding part of the gameplay experience for players to learn an animal’s schedule and utilize that information, the same way they would in real life.
All of this is just the gist of some of the research that goes into adding a new animal species to a theHunter game…not to mention the many hours of research that go into the art and animation side!
3. WHAT ARE TYPICAL ANIMAL BEHAVIORS ANYWAY?
To create believable animal AI, it was necessary to have:
3A. BASIC NEEDS, INCLUDING EATING, DRINKING, SLEEPING AND ROAMING BETWEEN "NEED ZONES"
To make some of these behaviors feel less robotic, the eating behavior, for example, it isn’t just, “Deer, stop here and eat the grass until you’re done with your eating behavior!” (Apparently working the behavior tree equates to being a Deer Whisperer.)
To create more believable feeding behavior, I added a few branches to the behavior tree for various eating behaviors, including:
- Finding a new point a random distance away (but still within the feeding area),
- Walking forward while grazing (essentially a lawn mower behavior!), and
- Simply putting its head down to eat for a random number of seconds and then lifting it again.
In between these behaviors, the animal might play an idle animation, such as shaking its head, looking left or right, or scratching/biting itself. This ended up looking nice, even in large groups, as there was enough randomness in the animal’s activities and timing to look more natural.
Similarly, it added a lot to animal behavior simply to vary the time animals in a herd left a “need zone” (feeding, drinking, resting) and continued onto another. It would look alarmingly strange for all the animals in a herd to suddenly stop eating and leave at once! Instead, a “leader” of the group “decides” it’s time to move on, and, when the other individual animals are done with their current activity, they follow. This is one of those behaviors where players don’t particularly notice when it looks natural…but if all the animals in a herd were to do the same behavior at the same exact time, you can bet you’d read about it in the reviews of the game!
Hunters frequently use animal callers to draw animals in closer…and each species has their own, unique approach behavior.
Basically, where enemies in FPS games have their own “Take Cover”behaviors (rolling, running to posX, etc.), theHunter has Approachbehavior. Since it is something players see a lot over the course of the game, it was critical that we accurately emulated how each animal would respond to a caller.
This video clip shows a Fallow deer’s approach behavior as it responds to a caller in theHunter: Call of the Wild. (You can also see where the deer’s senses are triggered, switching from the Approach behavior to an Alert behavior, showing which of the 3 senses were triggered.) Here is this same approach behavior in real life. (It moves a little faster at points in this video since it’s in the middle of the rut – mating season – and thinks another male is encroaching on its territory!)
The cool thing about the implementation of this in the behavior tree (involving different approach angles and walk speeds) is that there is enough randomness in how each species responds to a caller that players are never 100% sure how an animal will approach. (“Will it trot? Walk? What angle will it come at? Will it stop? Will it run straight for me? Will it call back and reveal its position?”)
The different approach angles also mean that players may need to watch and wait a while before getting a good shot. (I’ll get into this more in the Hit/Hurt behavior, but players typically players try want to hit the spine, heart, or lungs, meaning they need to be very specific about the angle at which they shoot an animal.)
It had to be immediately obvious to the player that they alerted an animal and how they alerted the animal.
This is something Björn reiterated throughout the development of CotW– animals had to react to something. If they reacted to, seemingly nothing (from a player perspective), players may chalk the behavior up to bad AI and possibly stop playing the game.
Many deer species in real life (and other species, like the Red Fox), make a sound to warn other deer nearby of danger. We used this opportunity to draw the player’s attention to the fact that the animal was on alert (much in the way that a human enemy might say, “What was that?” in a shooter or stealth game). At this point, players typically slow their speed or choose a different stance (crouch or prone) to avoid detection.
After learning more about the different senses of the animals, I realized the alert behavior provided a good way to also show some of the species’ unique characteristics. For example, select species of deer can actually distinguish between stationary objects and objects in motion, but most can only see objects in motion. Similarly, some deer species have a keen sense of smell, in addition to good eyesight! This makes certain species significantly harder to hunt, particularly when a species is more at home in the densely forested mountains (such as the Red deer).
Because the Fallow deer and Roe deer’s sense detection is very different from one another, players must approach the two species in different ways. The Fallow deer is designed to be an “easier” species, so it is more possible to continue moving toward the deer once it detects the player. However, the Roe deer typically continues to “bark” (make its alert sound) when the player moves toward it. This means that players must change their approach behavior for the Roe deer, backing away before 1. circling around to the side and 2. approaching the deer again. By first backing away, the player gets out of earshot before clearing out of the scent trail (wind).
Of course, this Call behavior also gives hunters somewhat of an advantage. However, this behavior was balanced out with a difficulty scale for older (and higher scoring!) animals. Typically, hunters/players want to bag the big bucks, and we didn’t make it easy for them! I’ll talk about this more later on in the post, but higher scoring animals call less frequently than lower scoring animals, plus, as I mentioned previously, live in tougher terrain and have sensory advantages.
Once the player is aware of an animal alert to their presence, the triggered sense is emphasized through smell, look, and hear animations. (Again, making the player aware that they did something to alert an animal before it flees.)
Without the player knowing which organ they hit (and therefore, how far they might have to track the animal), players would be left wondering whether they landed a direct hit or not. As a result, this behavior became rather detailed, since it is such a significant part of the “tell” for the player.
(Here’s an example of a hurt behavior. CotW’s animation team did a fantastic job with the animations and making sure each animation was readable to players!)
A major part of theHunter games is ethical hunting, meaning that players are encouraged to kill animals as humanely as possible. I know that the idea of “ethical hunting” may seem strange to non-hunters (and it took me a while to learn the ropes of ethical hunting), but there are a lot of rules – and even differences of opinion among hunters – about minimizing animal suffering. It’s fascinating to learn about. Throughout the research I did for this game, I gained a huge respect for hunting and different hunter’s opinions on ethics. (Now that I mention it, hunters between different countries and regions have varied perspectives on hunting as well.)
Although headshots are typically seen as a good thing in games where it’s people who are the enemy, that is absolutely not the case in hunting. In fact, headshots are actually a source of contention, as it is very possible a hunter won’t make a headshot to fell an animal as humanely as possible (due to factors such as the wind and skull size/thickness).
Typically, hunters/players try to hit the spine, heart, or lungs, so it became necessary to switch out animations for hits on different body parts, in addition to changing other aspects of AI design, such as animal flee distance.
4. TAKING THE AI DESIGN FURTHER
Now that we’ve taken a look at the fundamentals of designing a new animal species in theHunter games, let’s take a quick look at how the design was taken further.
As I mentioned, players (particularly real-life hunters!) know when a species behavior is off. It’s like good localization, UI, or programming – players don’t notice the “good.” Rather, it’s the “bad” elements that stick out the most!
I also mentioned that a ton of research goes into these games. I wasn’t kidding! I spent a tremendous amount of time watching videos and webcams of animal behavior. Each morning in Stockholm, Sweden, our team’s scrum meetings began with the sound of an actual animal caller, and just after, it was prime time for deer feeding back in the US, where a fantastic deercam was based.
(With all this research, it even got to the point where I had dreams about deer frolicking in the fields. I don’t really miss those dreams! The same thing happened when I studied Chinese in college – I eventually had strange dreams with Chinese characters floating around in space.)
While it wasn’t absolutely necessary to watch that many videos of animal behavior, it was absolutely worthwhile. A lot of what I discovered wasn’t laid out for me in animal behavior or hunting guides. It took hours of scouring videos to learn the behavior of different species and then figure out how to best represent my findings in-game. There were behaviors I learned from these videos that I simply couldn’t have learned any other way.
4B. THE QUIRKS THAT MAKE A SPECIES UNIQUE
For example, if you look up “How a Roe deer approaches an animal caller,” you won’t find very detailed information of their approach patterns, such as the distinct S-shape (as opposed to the Fallow deer’s zigzag), approach speed and other odd quirks a hunter notices over time when calling a Roe deer in.
You can find some useful behavior information from searching online, but not at the level of detail an AI Designer would need in order to properly portray an animal’s behavior!
4C. INCORPORATING HUMAN IMPACT
Over the course of designing the animal AI in theHunter: Call of the Wild, I was surprised to learn how humans affect animal behavior. I ended up designing some of the AI to incorporate what I learned.
For example, I learned that the more humans encroach on animal territory, the more animals become habituated to people and subsequently venture into the suburbs. Until 1981, there had never been a reported, fatal coyote attack in the United States, and until 2009, there had never been a reported, fatal coyote attack on an adult. (Here’s a link to a documentary of the attack on the young folk singer Taylor Mitchell if you’re interested in learning more.)
While most animals are naturally afraid of humans, experts believe some animal species are losing their fear of humans and that it is important to re-establish this primal fear in predators to discourage attacks on people. (In fact, Native Americans were said to have scared off wild animals in order to sustain this dominance.)
It’s one of those minor details within the game, but instead of keeping prey and predators away from human territories (points-of-interest) in the game, I overlapped their home ranges with human areas to imply that the animals are habituated to human presence.
(If you were designing an alien species for a game, you could do a similar sort of thing to imply certain narrative elements. One alien species may overlap with another but circle around a different species where there have been conflicts in the past.)
There are many other aspects of the behavior and design I could cover here, but it’s honestly better if you experience the game for yourself!
Although some nuances may be lost on players who don’t necessarily know much about animal behavior, it all comes together in creating believable animals and, as much as possible, keeping the player surprised through AI design.
In reality, it will take a player many hours of playing theHunter: Call of the Wild before they experience the differences of calling in multiple deer species for example, but all of the small details add to the overall experience of playing theHunter.
From the standpoint of AI Design, theHunter: Call of the Wild was a truly fantastic game to work on! There was the challenge of incorporating realistic behaviors into a game experience, but there were areas (such as animal approach behavior) where I also had some creative freedom.
In playing other games and learning how AI was designed across other genres, there are most definitely other opportunities I see for incorporating the behaviors I learned from animals and applying it to other types of AI design in games.
Animal behavior absolutely applies to human behavior at a primal level,as well as informing the design of aliens and other fantasy/sci fi species.
(If you followed Horizon Zero Dawn’s recent articles and videos about their production process, you’ll see that they also used a lot of animal videos as reference for the animations of their “animalistic machines.”)
Beyond AI behavior itself, from theHunter: CotW, I also learned about other features that strongly supplement the implementation of AI, such as environmental considerations, which can absolutely be applied to other games (pitch points and how to incorporate them into the level design).
It can be challenging, to say the least, to create truly believable animal behavior in a game that is supposed to be both fun and challenging for the player, but it’s awesome to see all of that research and design come together. It was also enormously beneficial that many members of the development team were involved in the development of the original theHunter game, as they carried forward a lot of what they learned from the original.
The AI design and game design of theHunter: Call of the Wild worked together – alongside the many other aspects of the game! – to give theHunter fans the nuanced, realistic hunting experience they were looking for. Some players even noted the differences between animal behaviors and appreciated the details we added:
Thanks to Avalanche Studios, Expansive Worlds, and theHunter teams! It was an incredible opportunity to work on theHunter: Call of the Wild. I’m grateful I had the opportunity to work with such an amazing team & studio! Thanks also to Patrick Enz and Dan Peake, who worked on additional species and predator behavior.
ADDITIONAL BLOG POSTS
For additional blog posts and videos from the development team, check out:
GENERAL INFO & CONTACT
theHunter: Call of the Wild
Official website: http://callofthewild.thehunter.com/en/ Steam page: http://store.steampowered.com/app/518790/theHunter_Call_of_the_Wild/
I currently have limited availability for AI & Game Design Consulting.
Reach out if your team needs additional design work or simply a “2nd pair of eyes.”