This article was originally published in PC Gamer issue 301. For more quality articles about all things PC gaming, you can subscribe now in the UK and the US.

More than any other artform, gaming is defined by antagonism. From the earliest arcade machines to the most extravagant FPS, pitching the player against an external threat has been one of the industry’s foundational elements. As gaming evolved beyond the quickfire pleasures of the arcade, so have the opponents the player faces. The barrel-lobbing, space-invading pixels of the ’80s have been replaced by evil fantasy overlords, megalomaniacal dictators and rogue AIs. Many of gaming’s most iconic characters are its villains, from Monkey Island’s ghost pirate LeChuck, to System Shock’s almighty SHODAN.

At their finest, villains can challenge the player not just on a physical level, but on a moral and ethical one, and gaming is uniquely equipped to portray these scheming, deceptive opponents. It can enable them to get inside the protagonist’s head—literally, in some cases—or allow the player to judge their twisted morality for themselves. Soon, gaming may even be able to present us with villains that adapt to the player’s behaviour.

“Everyone likes villains,” says Tom Jubert, the writer behind Frictional’s Penumbra series, The Swapper, and the Talos Principle. “They’re just more fun... you can have them do some crazy, really far-out stuff. They’re super-interesting because they have to be conflicted, and they have to wind up doing these terrible things for plausible reasons. So everyone likes villains before you even start.”

Villains are particularly enticing because they allow us to explore thoughts and actions which are unacceptable in everyday life, embracing and exploiting power or anarchy without being burdened by feelings of guilt or shame that would normally accompany such behaviour. “Who isn’t a little bit moved by the anarchy of the Joker?” says Jubert. “There’s always something a little bit glamorous, a little bit attractive about their worldview. That’s what makes it really exciting.”

This idea of villains being more fun as characters is particularly relevant to games, where the player often fills the protagonist’s role. Much of Jubert’s work has been on projects where the game is first-person and the main character is mute. “That in itself means that the villain is going to take on a hell of a lot more of the character of the game than the central character is,” he points out.

It’s not surprising that this style of storytelling has produced some of the industry’s most memorable villains. System Shock’s SHODAN, BioShock’s Andrew Ryan, and Portal’s GlaDOS are frequently ranked among gaming’s best villains, and they all star in games where the player character is barely fleshed out at all. Devoid of a compellingly written protagonist, the antagonist must shoulder the burden of making the game spark with character.

Jubert’s own villains are very much in this vein, although intriguingly, many of them don’t take physical form either. “There’s a weirdly high proportion of my villains who don’t even exist before the game starts,” he laughs. The most well-known of these is Clarence, the antagonist of Penumbra: Black Plague. Clarence emerges as the result of a strange virus that infects the protagonist early in the game. Initially part of the protagonist’s mind, Clarence gradually forms an identity of his own.

Jubert first conceived of Clarence as a computer virus with whom the player would interact in a branching narrative, but the Frictional team were uncertain about developing interactive dialogue, so he came up with something else. “I wanted to do something that took advantage of the few resources that we had. We knew we were never going to have an on-screen character,” he says. “So to put it inside the character’s head was a nice way of how to avoid another radio character going on.”

Good people are capable of terribly evil things. David Gaider, Dragon Age: Origins

As a character, Clarence bears many similarities to Batman’s Joker. He is by turns comical and sinister, and likes to manipulate the player into dangerous situations and committing morally compromising acts. But what makes Clarence memorable is how he messes with the player’s perspective. Early in the game, Clarence discovers he can alter what the player sees. At first he uses this to play practical jokes on the player, making doors vanish and reappear. But as he grasps the extent of his power, his pranks become far more malicious. “I was really proud of those bits, because they cost nothing to do,” says Jubert. “It’s just teleporting the player around some cheap level design. But the impact combined with the writing can be, I think, quite powerful.”

This technique is also used by Rocksteady’s Batman games, particularly in the Scarecrow sections of Arkham Asylum, and Batman’s projection of the Joker in Arkham Knight. It’s a simple but effective way of demonstrating the villain’s power over the player, while exploring the relative nature of the player’s perspective, inviting them to question the nature of their identity.

Incarnate

Games excel at portraying these kinds of villains, the post-human puppet-masters who pull the player’s strings. Rarely seen yet ever-present, they manipulate the player remotely, often forcing them to run a deadly maze while they await a fi nal confrontation in some distant ivory tower. Yet while the likes of Clarence and Arkham’s Joker are showstopper characters, always ready with a memorable one-liner or a brilliantly insane plan, they’re diffi cult to empathise with, to relate to on a human level.

The most terrifying villains are not all-powerful AIs or gleeful psychopaths, but people who you can see yourself in if you had just made different choices. These more human villains are considerably rarer in gaming, simply because creating convincing characters in a game world is one of the hardest things a developer can do.

Nevertheless, there are some superb examples of human villains in gaming, and one of the best is Loghain Mac Tir, the main antagonist of BioWare’s Dragon Age: Origins. Loghain commands the armies of king Cailan in the fi ght against the Darkspawn, but he abandons Cailan during a climactic early battle. Leaving the king to die, Loghain declares himself regent, seizes power for himself and declares any who might oppose him traitors to the crown.

David Gaider was lead writer on Dragon Age: Origins, and he explains that Loghain formed part of the game’s general shift toward a more morally ambiguous form of RPG. “A lot of Dragon Age was us at BioWare reacting to things we did or didn’t like about Dungeons & Dragons as a game system or a setting, so I’d say the effort to move to something more morally grey was intentional. Good people are capable of terribly evil things, and terrible people are capable of great good.”

The reasons behind Loghain’s betrayal of Cailan are deeply complex, stemming partly from a concern that Cailan plans to abandon queen Anora—Loghain’s daughter—in pursuit of a marriage alliance with another realm, and partly from his view that Cailan’s reliance on bravery and valour over a sound tactical advantage will prove poor weapons against the Darkspawn. Nevertheless, for Gaider, the core motivation behind Loghain’s decisions remained the same. “It was always that Loghain would be someone who perceived himself as the good guy,” he says. “I think those are the villains that intrigue me the most, the ones where you can put yourself in their shoes and imagine you’d make exactly the same decisions even if you opposed them.”

Any trickery would feel like the game was cheating.

This is a concept that’s been explored further in games such as The Walking Dead and The Witcher 3, where the line between good and evil is so blurred that at times it’s difficult to tell them apart. In Dragon Age the water isn’t quite so muddied. Many of Loghain’s actions are undoubtedly evil, but motivating them are visibly human emotions: fear, conviction, and love for his daughter, Anora. Where Dragon Age goes farther than most games is in how it allows the player to make a final judgement on Loghain.

In a climactic encounter at a gathering known as the Landsmeet, the player can duel with Loghain and, if he is defeated, decide whether to kill him, spare him, or even recruit him into your party (at the cost of another party member, Alistair). “Part of making Loghain’s motives understandable is allowing for the possibility that a player might not hate him, and might picture him as simply misguided. It was intentional, and in many ways I myself viewed him more as a tragic figure,” says Gaider. “It made the decision to kill him more poignant, I think, in that there was also the option for redemption.”

This kind of flexibility in a villain’s character and how the player can respond to it is entirely unique to gaming. It isn’t just the remit of RPGs either, games like The Stanley Parable offer an antagonist whose relationship constantly alters toward you depending on the choices you make.

That said, nearly all the games mentioned above rely heavily on the ability of the writer to create such memorable villains. Is it possible to construct a villain entirely through a game’s systems? Certainly, developers can create antagonists this way, a practice you can see anywhere from racing games to computerised chess. But a villain is more than a mere opponent. They are singular, with a clear identity and motivation. And they need to be cunning, capable of deceiving and manipulating the player.

Silent villain

One game that demonstrates many of these elements is Alien: Isolation, The Creative Assembly’s stealth horror game in which the player is stalked through Sevastopol station by the Alien. Because it is ultimately an animal, the Xenomorph has no dialogue and therefore no script through which it can be infused with personality. Instead, the Alien’s character is formed systemically, through how it dynamically hunts the player. Far from simple patrol paths, the creature is scripted to be unpredictable yet deliberate, to exhibit all the cunning and moment-to-moment decision-making of an apex predator.

To achieve this, The Creative Assembly built a unique, multi-layered AI system. “Our basic premise for the AI was ‘not to cheat’,” says Clive Gratton, technical director on Alien: Isolation. “The level is pre-processed to find interesting places for the Alien to search. We then drop it in with a few parameters to say how fast to search, where and what size radius. If the Alien hasn’t spotted the player then it’ll do a leisurely search of a large area.” By comparison, if the Alien has spotted the player running into a room, then it will do a far more thorough search of that particular region.

Part of this “honest” approach to AI design was to keep the Alien’s presence in the ship consistent with how the player perceives it, and this applies equally to when the Xenomorph is not on screen. “If you can hear the Alien in the vents close to you then there’s more chance that it can hear you and will come down. It is actually traversing through the vent network,” Gratton says. This approach is a fascinating inversion of how villains like Clarence and Loghain are designed, where deceiving the player with narrative tricks is a key part of making them “feel” villainous. Here, any trickery would simply make the player feel like the game was cheating and spoil the immersion.

We wanted the Alien big so that it had presence, and the environment small so that it was claustrophobic. Clive Gratton, Alien: Isolation

Alongside its artificial intelligence, Isolation’s level design is almost as important in making the Alien’s character convincing. Not only do the environments aid the Xenomorph’s navigation, containing objects that “call out” to the Alien as locations it should search, but the overarching level design had to be extremely precise in size and layout to sustain the threatening atmosphere.

“We wanted the Alien to be big so that it had presence.” Gratton says. “We wanted the environment small so that it was claustrophobic. This made animation, AI and locomotion difficult at times because the character had to negotiate the world very accurately so that it didn’t bump into doorways and look silly.”

This potential for slapstick and weirdness, a feature that is actively encouraged in open-world games and management sims, is what makes creating a systems-driven villain so difficult. Even for an enemy as fundamentally inhuman as the Xenomorph, creating a convincing effect requires a meticulous design. But Alien: Isolation has shown that it is possible to frame a horror game around a single character, and now other developers are looking to build on its template. Capcom’s Resident Evil 7, for example, has a similar structure to Isolation, but switches out the Xenomorph for a family of virus-infected hillbillies, attaching those deadly hide-and-seek behaviours to human adversaries.

It’s also no great stretch to imagine Isolation’s design applied to a game like System Shock. Imagine a SHODAN who doesn’t just taunt you over the space station’s intercom, but can lock and open doors, switch off gravity or suck the oxygen out of a room at will, all through systemic decision making rather than scripted narrative. Gaming is becoming increasingly adept at engendering character through systems. This, I believe, is where the next big leap forward in virtual villainy lies.