'AI and Games' is a crowdfunded YouTube series that explores research and applications of artificial intelligence in video games. You can support this work by visiting my Patreon page.
Watch Dogs: Legion is an evolution of the open-world hacker playground we have come to expect of the franchise. As part of the resurging Dedsec rebellion, you cause chaos across an authoritarian London to bring down the cities ctOS surveillance system and expose the injustices brought by private military contractor Albion.
To help you in your mission, players must find new recruits for the Dedsec hacker group. And in a first for the series, the game introduces what Ubisoft refers to as ‘Play as Anyone’ – a gameplay system that allows the player to take control of any character seen walking through the streets of London once they’re allied to the cause. With each newly unlocked character, you have access to an increasing array of abilities, perks and gadgets. Be it silenced weaponry, cloaking devices, attack drones or new vehicles, ranging from motorcycles and vans all the way to ambulances and rocket-firing spy cars.
Each of these characters is unique and procedurally generated at runtime while you play the game. In order for this to work, not only does the game require a character generation system that prioritises diversity in the makeup and style of each citizen, but also a means to create unique backstories and missions for recruitment. This results in a system that manages their behaviours and daily schedules – even when they’re not visible to the player – and is one of the most complex character simulations of its kind for an open-world action game.
We recently sat down with several of the games development team from Ubisoft Toronto to find out more about how ‘Play as Anyone’ works, including.
- How the ‘play as anyone’ concept emerged and the evolution of Watch Dogs character systems.
- The complexities of procedurally generating character profiles and backstories such that they feel unique, diverse, engaging but also grounded in reality.
- How recruitment missions are built to be unique storylines driven by their backstories.
- What influence your behaviour has on the citizens of London and how their opinion of Dedsec is influenced by your actions.
- And just how deep the in-world simulation system really is within Watch Dogs: Legion.
Play As Anyone
Legion‘s ‘Play As Anyone’ mechanic is exactly what it says on the tin. As you wander around London, any citizen you see walking down the street can be unlocked and used as a playable character once you have convinced them to join Dedsec. Much like previous games in the series, scanning a character with your mobile phone enables you to see information about them. Including their name, their profession and quirky and unique information about their personal lives. But what’s new to Legion is that you can now see what value they could bring to the Dedsec initiative, they might have a buff or nerf for in-game abilities such as combat and hacking, have access to specific weapons, gadgets or vehicles or have outfits that enable easy access to environments you typically would not. Hence while you might try and break into a police station in order to complete a mission, you could instead recruit a police officer to join Dedsec and then just walk through the front door without anyone batting an eye.
Once a citizen joins Deadsec, you can then quickly swap from one recruit to another. As your collection of characters grows, you can begin to tackle missions in different ways based on the skills they have available to them. And this is the core of the Watch Dogs: Legion experience as you build your own set of recruits and pick them based on their proficiencies, or just because they look cool. But each character you engage with maintains a much more complex set of logic and internal decision making than anything seen to date in the series. When you’re not playing as a given Dedsec member – or any other character that is a potential recruit – they persist in the game world and continue to go about their daily lives: going to work, meeting friends, visiting family, dealing with their own personal issues and going home at the end of the day to get some much-needed rest.
In the closing weeks of the game’s development, I had the pleasure of sitting down with three members of Legion’s development team to learn more about how ‘Play as Anyone’ works and the design considerations that help make it a reality. Joining me were Liz England, team lead game designer for ‘Play as Anyone’, Jurie Horneman team lead programmer for the ‘Play as Anyone’ mission systems, and Martin Walsh, who is not only the technology director for gameplay and AI for Watch Dogs: Legion but was also lead programmer on Watch Dogs 2 – which was the subject of a recent episode of the main AI and Games series.
So the first thing on my mind was I wanted to know about the journey between these Watch Dogs titles. And how the evolution of the systemic and emergent gameplay that has been in the franchise since the beginning led to the ‘Play as Anyone’ concept.
Martin Walsh [Technology Director (Gameplay & AI), Watch Dogs: Legion]: It actually started right at the very beginning. It was probably the second conversation I had with our Clint Hocking our creative director, we were talking about what his vision and what he said to me was ‘what if every NPC is an open world?’. And I had watched an interesting AIIDE talk by Ben Sunshine-Hill called the Alibi generation system. So we had talked about that a little bit and we came up with basically the concept of, y’know, instead of having tons of simulated characters, being able to generate a backstory essentially in run-time for characters and we got to build on the excellent work that was done on Watch Dogs 2.
And one of the other concepts was, internally we like to call the way our systems collide ‘the anecdote factory’. The idea is you have these systemic open-world games and the way the systems come together to create these interesting experiences, these are the anecdotes generated by the factory. And for us, we came up with this idea ‘from anecdotes to stories’ and so the idea is not only did we add this deep simulation in terms of the scheduling [of NPCs] and every character has connections and lives and you can actually play as them. Bring them all the way from a character in the world all the way into a playable character, but there is also a ton of persistence that goes into that. So these characters have schedules but those schedules can change based on what you do to them or do for them. They have relationships, they have permanent memories so they remember things you’ve done for them or against them, those memories propagate to their enemies and friends.
So the more you play the game basically, the more hardened and persistent the game becomes. So whereas initially, it does start out as just anecdotes, so y’know ‘I accidentally punched this guy in a bar and the bartender got mad and it started a big fight’, but later on that’s Joe the bartender who works at that bar. We have this concept of recasting where we can take any character you’ve encountered in the game or done something to and knows about you and cast them in a later mission or story and so that’s really the coming together of those two concepts. It creates a lot of the depth and a lot of the stuff that even we still find pretty amazing honestly when we play the game.
The London Simulation
When you jump into the Deep Profiler in Legion and take a look at a characters background information, we can see much more of their daily schedules. This can include all sorts of activity: visiting locations in the open world, going home after a long day at work, meeting up with a friend or family member as part of their daily routine. Naturally you begin to wonder how deep this simulation is and whether the action implied by the deep profiler are actually executed, or is it all just a fabrication designed to make the world sound richer than it actually is. If I start following a character who is meeting a pal for a drink down the pub, is he actually going to go there?
Martin Walsh: We really made a lot of those systems for people like you who wanted to role-play or explore the lives of the characters. So almost all of it, as much as we could possibly make real, is real. So yeah, they really live at that address, they will really physically go to that address and sleep there in the night and walk out the door in the morning. Maybe they’ll take the tube to work and hang out with their buddy at the pub. That was one of our high-level directions that we wanted everything you saw in the Watch Dogs 2 profile to actually be real in Legion.
And for the most part it is, Liz [England] and the writers put together a bunch of clever extra bio things that support the story, and go along with the backstory of the characters. So if in the bio it says that [a character] meets his mother for brunch, he’s gonna meet his mother for brunch, if it says he works at this place, he works there. That was part of the challenge as well, in that in this physical game world with obviously a different time also – it’s not a 24-hour day cycle – we had to make sure that we could, as much as possible, schedule them in ways that they could physically make it to the places they were scheduled to be.
The way this is achieved is that citizens go through a procedure often referred to as ‘uprezzing‘, where they are essentially promoted from being just another face in the crowd to a character that is part of your experience in Watch Dogs: Legion. By default, a character is procedurally generated to appear in the world – and we’ll discuss how characters are created in a minute – but by and large they’re background fodder for the player. If they pass you by and you ignore them, then they will simply be deleted once you’re far enough away, but any character you interact with or has engaged in any activity that catches the players attention will be promoted into the deeper simulation. But in addition, it will also promote their personal connections: their family members or friends who have some active involvement with them in the game world. All of this results in multiple tiers of characters being monitored and maintained by the simulation.
Martin Walsh: There are different tiers. There are the number we can actually spawn on screen and doing all of their animations. Then below that we have the sort of the ‘fully uprezzed’ simulation layer, so this is every character that you’ve added to your database in some way that we’ve cast in a mission. And then there’s a layer beyond that, that stores a bunch of other character that you’ve incidentally ran into or it’s the brother or somebody you have uprezzed.
And this active collection of hundreds of citizens will eventually cycle out older characters you’ve not interacted or engaged with such that it can continue to introduce new ones the longer you’re playing in London. But it’s not just a collection of active and moving characters, any uprezzed character has their full profile generated at runtime, including their backstory, their affinity towards Dedsec their relationships to other characters and their schedule of daily activities. The schedules repeat every day until something changes: so characters move through the world to specific locations given it’s in their schedule to be there. This means that once you have unlocked the deep profiler and uprez a character by looking at their schedule, you’ll be able to catch them in the open world as they go about their business.
Liz England [Team Lead Game Designer, Watch Dogs: Legion]: And so when we build out their schedules, we’re filling out a 24-hour day. And we’re portioning out a part for sleep and they have a location they’re gonna go to for sleep. So it’s like an hour before they go to sleep, they start their trek to go home, to go to sleep. And then wherever we schedule their like, martial arts training in the park, they’re going to try an hour beforehand and think ‘well, I was drinking at the pub’ – *laughs* this is not, this is not the order of events you should exercise in – but like ‘I was drinking at the pub and oh yeah in an hour I need to be doing martial arts in the park, so I’m going to head over there right now’. Meanwhile, if they’re doing martial arts with like their friend, it’s an activity with two people in it, their friend who has also been uprezzed, wherever they are in their schedule they’ll go ‘oh, time to go do martial arts’. So wherever they are in London they’re also walking there too. So when you get to the park, you’ll find them both together at the time when their activity is supposed to start, and they’ll do that for about an hour and then they’ll go off on their next activity.
Martin Walsh: We actually simulate the path they take from whatever point they’re at to to the next one. So if you knew he left here at 7pm and was gonna be at 8pm you can actually try and intercept him halfway through and he will be somewhere on that path – I mean they can also take the tube – but yeah so we fully simulate the path. I mean so at that point they’re not loaded so they’re not ‘walking’, but we know the rough speed that they would be walking and so we simulate them at a high enough rate that you could catch them on any point on their path basically.
And for anyone curious, each Metro station is essentially a fast-travel node that allows for characters to teleport from one area of the map to another. But it’s important to acknowledge that the schedule can also be interrupted. If you do something that impedes their ability to go about their daily routine. If you put them in the hospital their schedule will change to state that they’re stuck in there recovering. And this change to the schedules also impacts their social connections. Hence if you do something nasty to a citizen – and hopefully you don’t I’m assuming you’re all nice people – it will have a huge knock-on effect on how the schedules of their friends and family in the future.
Liz England: So when you’re looking at that deep profiler and we we’re talking about the schedules of characters changing over time, if someone goes out to eat with their husband every day and then you go and murder their husband – I’m not suggesting this – then instead of going out to eat, they’re gonna mourn their husband. And you should feel bad… *laughs*
And as mentioned already one of the big features of the simulation is the notion of recasting: once a character is uprezzed in the simulation, then you’re more likely to see them in the game world; becoming a critical element of specific missions later on in the game.
Liz England: The more people you have expressed interest in, the more people you’ve saved to your contacts and uprezzed in the simulation. We try to take those people and say ‘bring them back in front of the player’. And this is, I think, particularly obvious if you stay in one area and you add contacts all in that area. Because them and their friends, and their family, and their best friends, are mostly going to stick around that area. So you’ll see that more often there too.
So say if someone is getting pickpocketed on the street and you glance over there, there’s a chance it will be someone that you actually know who is being victimised. And so now you think ‘oh do I help them or do I not help them?’ And this happens in general as you uprez these people and express interest them. As you’re adding people to your contacts, then the world of London is still a world mostly of strangers, but you’re getting more and more of these characters that you’ve met in that world.
It fills in the simulation with those bits and pieces that make the world feel a little more alive. So you’re not always just walking down the street surrounded by strangers, you start running into people that you know.
Procedural Character Generation
While Legion’s simulation system helps maintain each character and their life schedules, there is the issue of how character generation itself works. Now procedural character generation is nothing new to the franchise, most recently in episode 56 of AI and Games, we looked at how characters in Watch Dogs 2 are generated based on their location in the Bay Area and how they’re configured to react to the world around them. While much of the response system remains the same, the big difference is the range of diversity you can see in the citizens of London.
In Watch Dogs: Legion, the focus was to ensure not just the visual elements of a character can vary quite drastically, but also the system that creates jobs, their backgrounds and personal histories should be sufficiently varied that it enables for a rich and diverse set of characters. This is an incredibly complicated system, given one of the biggest issues the team went about addressing was ensuring that the characters seem plausible but also ensuring that they don’t reinforce cultural or systemic bias.
Liz England: So that was one of the important parts right? On the one end if we just have a whole bunch of data and we throw it into the system without any kind of constraints, then we get ‘procedural soup’ and every character looks random. And then doesn’t matter how much diversity you have – and you could have a ton of diversity – if you read every character just as ‘oh definitely generated by a computer’. And on the other end, which is just as bad, is full-on stereotypes: every single lawyer would be the same, every doctor would be the same, every pickpocket would be the same. That’s not just not interesting but it doesn’t create an interesting experience for the player and it doesn’t feel like a game, a population, that feels real. Instead of it feeling like procedural soup, it just feels like ‘oh this is what the designers made’.
The character generation needs to have a starting point from which to create a lot of diverse combinations, all of which should seem plausible and realistic characters for this futuristic London, but also don’t have awkward or conflicting information in their profile. This is achieved in Legion courtesy of a background system known as Census which acts as a knowledge base that the character generation system can feed on.
Liz England: So in Watch Dogs 1 or 2, when you profiled someone, you got a little bit of information about them. Here’s their occupation, their income and a little salacious detail; a secret in their life. So what we did in our game was as part of play as anyone was can we make those details real? And so we have a whole system of census for doing that, for creating these characters that are consistent with each other and have all this information about them and are part of the simulation.
Martin Walsh: Census can basically fill in all of the blanks in a plausible way. So for example, if you see somebody who is a bartender, census knows roughly what a bartender makes and what kind of place this person could live and also if he works in this bar then he’s probably not living somewhere that’s a million miles away. So we have a bunch of systems that can essentially fill in all of the gaps: generate the backstory, their connections, their loved ones etc.
Liz England: Every character that spawns in our game comes with a set of tags: their gender, their fashion, their occupation, their income and then things like their personality, like how they would respond if you insulted them on the street. And then we take all this information – which is kind of static, once a person has this information that is part of their identity – and then we feed it into more systems. So we start with a base that is really solid and then we say ‘Okay, so their job is a lawyer, well they need a place to work in their schedule. They’re a lawyer, where can lawyers go to work?’ And we will pick a place for them to work. What is their income? Okay, well we need somewhere for them to sleep that matches their income. And then we start looking at their hobbies.
So you’re a lawyer, do you have any sort of law-related hobbies? Maybe there are hobbies that all lawyers do? Maybe there are hobby’s that all lawyers do? Like they always going drinking in the bar? Maybe they meet clients? Maybe they go networking? These are the sorts of like when we started looking at what kind of data to put into our schedules, we were also looking at who are we spawning in the world and what kind of activities might they have? And then still filling out our data on that end as well.
And so you have this lawyer now and they have hobbies, they have a place to sleep, they have a place that they work and then you also say ‘okay, what kind of relationships do they have?’. Some of this might be like they have a client because they’re a lawyer. They might also have a spouse or a sibling. They might have like a best friend and then we start saying ‘okay, what kind of activities would they do with these people?’.
A lawyer and their client might meet and go out to dinner and you start filling out who is this character, this lawyer, but we’re also filling in the holes of who they are based off of information about them, their income, their occupation and then we look at more things. And then we look at more things, like their subculture and things like that. And when we sta