Assassin’s Creed: Origins had an ambition
to create a persistent, systemic world of Egypt, where every NPC would have their own
schedule and you would feel that every character is actually a part of that world, to the point
that if you decide to just follow them around, everything they do would make sense. It clearly worked out, as evidenced by Assassin’s
Creed fans sharing online all their different experiences regarding the living world of
Ancient Egypt. And at GDC 2018, Ubisoft’s Charles Lefebvre
has told how everything works. The whole world is wrapped in a system called
Meta AI. It is primarily a tracking mechanism that
keeps information about the entities in Egypt, controls when to spawn them physically for
the player, and pushes the required behavior. The basic principle is as follows. Processing an actual NPC is expensive, you
need to keep track of its behavior, animations, sounds, visuals, physics, and many more things
– it’s a very costly endeavour and you can’t possibly hold in memory everything for 10000
NPCs across the world. But you don’t need to – what’s the point
of processing elements that players can’t see, right? It’s enough to just hold very basic and
most important information, like current position, object type, current goal, without worrying
about all the extra fluff. That way, you can track tons of entities for
a cheap cost. And by tons, I do mean tons. Origins’ Meta AI tracks about 50000 static
objects across Egypt. Static objects are gameplay ingredients, like
ballistas or braziers, but they’re also invisible entities, like spawners that for
example can create animals when players get near, or things called stations, that NPCs
can use as their goals. In this example we have stations labeled as
eating for poor civilians, so if somebody from that group gets hungry, this is a location
they can choose to go to. Origins also tracks about 12000 dynamic objects
around the player. These are of course humans, but they’re
also everything else that moves – like animals or boats. For the purposes of optimization, the tracking
is focused mostly on entities close to the player. If somebody’s very far away, they are not
being tracked unless it’s an important object, like a named NPC. But there’s no need to know what a random
civilian 10km away is doing, so they don’t exist until you get closer. Dynamic objects have 3 states. The first one is virtual state, when an object
exists in the world only as invisible abstract information like what it is, what is their
current position, what goal they are moving towards, and so on. In this state, the object information is updated
very rarely. The second one is the Bulk state. It is a very simple physical representation
for visible far away entities – a very cheap model, basic animation, simple behavior. In cities there’s a maximum of a 1000 of
these. And the final state is an actual real NPC
state with all components and behavior. Because it is very costly, there can be only
a maximum of 200 NPCs in a radius of 80 meters around the player, among which a maximum of
40 that can fight. To make sure that they are spread out evenly
for the balance of density and performance, locations are divided in cells of equal size
which allow only 16 dynamic objects to stay in each. Now, every character needs to know how to
move from location to location. To make the process of thousands entities
figuring out where to go as cheap and efficient as possible, Origins has a path network that
consists of many different nodes, links, and lanes, to create a massive yet effective way
for AIs to calculate how they need to move when they want to go somewhere. And this same network is actually used for
the Follow Road mechanic, so players can actually see parts of it in game. The last big aspect of creating a living world
is pushing appropriate behavior. Unless it’s a quest NPC that has more custom-built
goals, all characters and animals act through the system of needs. NPCs can have a need to eat, sleep, socialize,
work, or go to the loo, among others. When they have to implement those needs, they
search for the most appropriate station or NPC, and if they can’t find one, they will
do something else. This last part lies at the core of restricted
location design, where for example in a camp with 7 guards there would be only 3 bed stations,
so 4 guards would not be able to implement their need for sleep and keep doing other
things around the camp during the night. Animals, by the way, also have needs. For example they have a need to eat, and humans
are edible for some, so this can result in them attacking people. When all this is put together, we get a massive,
believable world of Egypt that you can see miles and miles of as you fly by with your
trusty eagle Senu. Everybody living their lives that don’t
revolve around the player. Like, at all. Thank you all for watching. If you’re interested in finding out more information
and technical details from the GDC talk, the link is in the description. A special thank you goes to my patrons! If you’d like to support my channel and get
invited to our discord server or get early access to videos, consider pledging at Your support would mean a lot! And regardless, don’t forget to like and subscribe!