Best of 2018: Red Dead Redemption 2 - how advanced AI and physics create the most believable open world yet
It’s been a wild year for VG247, so to celebrate we’re going to be republishing some of our favourite work published in 2018 – opinion pieces, features, and interviews, that we’ve enjoyed writing and reading, and which we believe showcase some of our best work. Enjoy!
Red Dead Redemption 2 - how advanced AI and physics create the most believable open world yet was first published on October 23, 2018.
It has been five years since GTA 5 released and it’s still the king of its genre.
From the way the audio distorts when you drive through a tunnel to how enemies tumble down a hillside when downed in a precarious position, the small details in GTA 5 come together to pull you into its grimy, crime-ridden rendition of Los Angeles.
With Red Dead Redemption 2, Rockstar is pushing the boundaries once more - this time in a huge slice of the Western frontier, including mountain ranges, stretches of farmland, the swamps of the bayou, big cities, towns, and vast canyons and deserts. The secret ingredients? Advanced AI, believable physics, and reactive dialogue options.
Across this massive landscape, you can speak with any character by squeezing the left trigger and selecting a positive or negative interaction. These play out differently each time, based on the context: your clothes, blood stains, mud, location, what the NPC is doing, your Honor rating, how much alcohol you’ve consumed, and more.
All of this happens in-game, rather than in a list of dialogue options on a static screen. It’s a fresh take on in-game interaction - triggered in the same way you would pull a gun on an NPC - and it casts the illusion that anything is possible. Rather than interacting with this world by only killing and maiming, Red Dead Redemption 2 makes words as powerful as bullets. Take aim, then fire off a quip.
Rockstar completely reworked its AI and animation systems to account for this broad range of possible interactions.
“I love interacting with the peds - even we are surprised every day by dialogue we haven’t heard before and how it all plays out,” Phil Hooker, director of technology at Rockstar North, explains. “It can be entirely contextual to the person you are interacting with and what they are doing, so there always seems to be something new to see and hear.
“There is so much going on under the hood - a huge amount of subtle gestures and animations that accompany the interaction dialogue that elevate the entire game to a much more natural level."
"For example, if a witness catches you doing something and Arthur says, ‘Ah, s**t…’ as you have to chase them down," lead AI programmer David Hynd adds. "Or if you chase a witness into the woods and Arthur says, ‘Come on out…’. Or if you barge into a saloon, the AI might stop and look, or the music may stop playing - the AI will weigh you up for a brief moment before going back about their business. Or not, if they see you as a threat. And it’s amazing how Arthur can sing and hum, or how we twist things up interaction-wise when he gets drunk.
“I think it’s the tiny details that make it all dance.”
GTA 5 was originally created for PS3 and Xbox 360, so the team was somewhat hamstrung by hardware limitations. When Rockstar created the next gen version of its open world crime saga, there was only so much the developer could do. The studio was able to increase the volume of pedestrians and put more cars on the roads, but it was unable to make improvements to the AI, even if the new hardware could handle it. Red Dead Redemption 2 is Rockstar’s first proper chance at seeing exactly what PS4 and Xbox One are capable of.
"By starting with a game designed for last gen, and pushing it as far as we could, we got a better idea of what was achievable on this generation of hardware," graphics technical director Alex Hadjadj explains. "Once screen resolution, texture size and draw distances were defined in a sustainable way, it highlighted the areas we needed to focus on for the next big step - things like a global lighting solution, atmospheric effects, or post processing and presentation."
The goals were completely different for GTA 5 and Red Dead Redemption 2, of course - not least because the open world Western is less densely populated than the streets of Los Santos. You're supposed to soak it all in, to stop and admire those distant mountains, to watch the herd of buffalo thunder past, to sit and stare at those storm clouds rolling in.
"RDR is slower paced than GTA, but it's also deeply textured and extremely detailed," director of engineering Klaas Schilstra adds. "That came through in the graphics in general as Alex said, but also in the detail of what the scene contains. For GTA, we needed a crowd to walk the streets. For RDR, we had to have a populated town of recognisable individuals, and each character in that town needs to do be believable, and seen to be doing something meaningful. It's possible to recognise the beginnings of this in the technology for GTA 5, but at the same time every one of our systems has evolved beyond recognition to make RDR possible."
Essentially, the more sparse nature of Red Dead Redemption 2 means more attention had to be given to the individual NPCs because they stand out more. GTA's pedestrians have their own behaviours, but the volume of them means their behaviour isn't as noticeable as it is here.
“It’s such a complex mixture of animation, AI, and dialogue that we couldn’t unravel it without fear of breaking such a complex game," Hooker says when asked about retroactively adding AI improvements to the next gen version of GTA 5. "The truth is, every part of the team came out of working on GTA 5 next gen with a real understanding of the hardware and incredible passion and motivation to carry out numerous technical revolutions in nearly every area.”
To sell the fantasy, Red Dead Redemption 2's emergent interaction systems couldn’t just be limited to pedestrians. This is the Wild West, after all. Walk into your camp and you can chat, sing, drink, and share stories with your gang members. Head into town and you can pet or scold a passing dog. Stand by your steed and you can brush, feed, and pet it. Head out into the wilds with your bow and you can whistle to attract the attention of an animal, causing it to raise its head before loosing a clean neck shot.
“Because you can do all these things with the people in the world, you expect to have similar interactions with the law,” Hooker explains. “And because you can do that, then you expect some interaction with animals in a similar way, so animal calls or petting a dog makes sense.
“We wanted to have that feeling of interaction and consistency applied to everything. As soon as we went to a certain level on this game in some areas, we realised we had to go that far in a lot more areas in order to make it feel like you were in the world and that the world felt believable to you. Maintaining that level of consistency across so much of the game, through the missions, into the camp, to the people in the camp to everything else out in the wider world, I think, means that you believe this world is really there.”
Rockstar created over 200 species of animals to cement that feeling, all with unique behaviours, every one of them capable of interacting with each other, and you. Each region has its own ecosystem, so you will only find animals in their natural habitats, each spread out into their correct social groups and behaving as the species would in the real world. On your travels, you might find a wild horse rolling in mud for fun, or you could witness an alligator viciously drag a deer into a river.
“If you are hunting carefully, you will find herbivores fleeing in the opposite direction of a predator if they are close to one another,” Hooker tells me. “It’s not something that’s limited to herbivores - further up the food chain you could also encounter wolves fleeing a grizzly bear if they find themselves at a disadvantage. Or a predator’s location might be given away by a desperate fight back from an unfortunate group of ambient riders.”
Speaking of riders, this obsessive attention to detail also extends to your horse, which you bond with over the course of the game. Red Dead Redemption 2 features various breeds of mare, each with unique capabilities. Rockstar wants you to feel like your ride is a living creature, rather than just a means of transportation: you have to care for it; it doesn’t teleport around when you whistle; it can die.
“We changed everything,” Hooker declares. “We started from scratch, trying to create something that was capable of the range of movement a real horse has - again, we had a passionate group of developers who worked closely together studying, motion capturing and even riding horses. We were able to create an amazing feeling of looseness with the player controls, where if you move the stick you get the action you want but the horse decides how it’s going to do it. Hopefully this reinforces the idea of the horse as a living animal.
“The team achieved that level of responsiveness through the idea of continuous movement, in that you will very rarely see the horse perform an animation that feels like a one-shot animation. No matter what it’s doing at any time, it’s capable of an incredible range of possible movement, so whenever you push the stick it can begin to change animations to respond. On top of that, the rider animation system is just as complex since it needs to reflect the relationship between the horse and rider, and that includes everything from jumping on and off, shooting, spurring, or being bucked.”
There are even subtle differences between the different breeds of horse - slight variations in how they move - as well as the more advanced riding techniques that unlock as you bond with them. Eventually, you will be able to ride your steed like a show horse, performing dressage and making tight turns at high speed. Of course, these mounts exist in this violent world, too, so they react to gunfire and predators like a real animal would, and you have to calm them or shout at them to flee to avoid being bucked or trampled. Much of this is thanks to Euphoria - Rockstar’s ever-improving physics system - and how it interacts with the many procedural animations.
“We use Euphoria specifically to enhance the physics-based reactions of both humans and animals and have really evolved it on Red Dead Redemption 2,” Hooker explains. “For example, if a rider’s horse is shot then there are a range of realistic outcomes like rolling off the horse, being dragged in the stirrups, or even being trapped under a dead horse and fighting to get free.
“Enemies now have a greater array of reactions if they’re injured, and if you try to lasso an enemy, they will sometimes try and reach for the rope or even fire off a few shots in the struggle to get free. This is all in addition to fine-tuning the classic Western stunt falls that were present in the original game and much more. Some of the coolest implementations in Red Dead Redemption 2 are about making human and animal collisions more impactful - making sure running your horse into vehicles, trees or buildings feels suitably intense. This is part of our larger goal to always make you feel like you’re physically in the world and also that there are consequences to being careless with your animal.
“However, Euphoria is just a part of how we simulate and animate characters and, outside of it, we have radically overhauled our entire animation system to create more accurate human-like and animal-like behaviour across the board.”
This overhaul was made to take full advantage of the current generation of hardware, allowing such improvements as realistic flowing water that disturbs naturally around animals, characters, and objects. All of this blends together to create a fully simulated natural world that abides by the rules of the real world.
"It adds to the feeling of immersion in the game as you see fish thrash and disturb the surface while reeling them in," lead physics programmer Ben Lyons explains. "And it helps to build tension as you disturb the water while creeping chest-high through the still swamps and seeing ripples from predatory animals lurking close by.
"Another key area of focus was the interaction between animation and physics in general, which has really allowed us to deepen how connected characters are with the environment and the vehicles they can use to explore it. Canoes and row boats will surge forward perfectly in time with every paddle stroke. Bushes and trees will move when you get close and you’ll see the player actively brush them away. You can run over uneven terrain with rocks and scree loosely falling away and see the player or horse adapt to the terrain, sometimes sliding down the steep and often perilous slopes.
"The horses feel like they are expending effort when pulling the wagons, especially up slopes or over difficult terrain. Wagons themselves have a real sense of weight, they creak and rock over every bump or crevice, their wheels can buckle, and their bodies can be broken into hundreds of separate pieces. We’ve really tried to make everything feel and react as accurately as possible, which should hopefully deepen the players feeling of connection with the world."
When under fire, bullets ping all around you, damage the environments, and create puffs of dust and smoke. Arthur and the other characters respond to this barrage by flinching, ducking, and reacting. Enemies also have a broader range of behaviours, gripping their wounded areas, diving for cover to reload, and even flanking and getting the drop on Arthur with a range of melee weapons.
“If you hole up in a saloon, they'll surround the building and cover all the exits before making an entrance in one coordinated attack,” weapons and melee design director Jason Bone says. “They'll even track you if you escape and look for signs of your movements to hunt you down. During gunplay, weapon accuracy can be affected by the intensity of the fight, and enemies will try to flank you and sometimes tackle you to the ground if they get the opportunity to get the drop on you. As you've seen with the Dead Eye system, we’ve also modelled critical body parts on enemies which can trigger extra damage, or make them bleed out if you hit them just right.”
"We've added a huge range of new animations to enemy AI to make them feel more natural during combat situations," animation director Mark Tennant adds. "Everything from using cover to reloading uses a much richer set of animations to make the enemies seem much more fluid and realistic than anything we have been able to achieve before. Enemies also have a lot more environmental awareness, so they are more reactive to what you are doing and to what’s going on around them. If they're under fire or if they're feeling calm or measured, this will be reflected in their behaviour, and you should be able to see that in a very natural way no matter what they are doing. Hopefully this makes them feel a lot more like believable characters with you in the world."
When GTA 3 released in 2001, it changed the industry and birthed a genre. Red Dead Redemption 2 releases almost two decades later, into that same genre - a genre now well-established - but it has the potential to have a similar impact.
Good looking open world games are everywhere these days, but they’re only getting prettier - nothing has attempted to advance physics and AI in the way Rockstar is here. With visual improvements offering decreasing returns and with a new generation of hardware on the horizon, Rockstar may once again have created the next step in the evolution of the triple-A open world.