[Music] thanks for being here this morning so early just before starting a few reminders please silence your cell phones at the end please fill the forms and give me as much feedback as you want and i will apologize for the french accent my name is charlotte i am a technical architect at ubisoft montreal and i've been working in games for a couple of years i've been doing a few games of some that you know some that you don't know and i've been working on assassin's creed origins that's why i'm here today and of course that's me but this is going to be the work of a big team that i'm going to present so enough about me who is a programmer who is a designer who has never played assassin's creed origins okay so if you haven't played
it's not for me it's mostly a game about patting cats riding unicorns and surfing on pyramids but some players have seen something else according to the forum and read it they have seen that the npcs seem to have now scheduled and that they are always alive is it true yes and i'm going to tell you why this is happening thanks to our meta ai so what did you add before my videos are not playing no okay i will have to do that that's really really manually so i really apologize for that try not to be late so what did we add in a assassin's creed sandygate basically oh sorry i can't see anything on my screen so i might turn but i apologize for that
we had only gameplay in the uh can i get the mic here no i'm turning all the time the gameplay was only happening around the players there was no gameplay when you were far from the player we had some some fake crowd that you could see when you were far but there was no gameplay opening you can see also some icons but they are not moving they are persistent icons and they are just telling you where you should go so why did we change first we have introduced an rpg element in a ingredient in our game ascent squid origin is not an rpg game but we have some ingredients and for example you can loot some targets you can loot some animals and you don't want to be able to kill a target loot it go away come back and be able to re-loot it again we have the eagle it's something new to the brand and with this eagle you can do a couple of things on a video that will not play
so with eagle you can go in the air focus on some npcs and see what they are doing so those end pieces are really close to you but you can also focus on npcs that are really really far from you like 400 meters away so you can focus on them see what they are doing you can see that they are moving and you can move his eagle you can go as far as you want from the player with the eagle and when you arrive close to them they're here they're doing something they're spawn and they're in the white state we have the long-range navigation we have what we call fear case there are bounty hunters that are attracted sometimes by the player and they need to be able to navigate even when the nav mesh is not loaded and
obviously the nav mesh will be only loaded around the player and we switch from a mission system to a quest system that means that we have multiple quests tracked and active at the same time and before we are only one mission active and sometimes when the when the target was too far from the player we were failing the quest the mission and you had to restart it now with this quest since you can have multiple active at the same time it's not something that we can do anymore also egypt is a huge world this is egypt this is london in san diego so it's ten times bigger so we need to have something that will create emergent and systemic gameplay because obviously we cannot fill this world with with a scripted or even small ingredients we need to have big ingredients that are moving and creating gameplay so what is the meta-ai it's a combination of three things it's a virtually tracking system that can track
objects virtually in the world it can be static objects and dynamic objects it's a spawning system in charge of spawning the visual representation of the subjects and it is a behavior system that will push goals and objectives on those objects it's not a game director every object is independent so we have static objects it can be a ballista it can be a brazier or it can be a cage they are always loaded it's end place data either placed by mission or level designers but they will be always loaded it can have a representation or not so here we have a station so it's a one kind of static object that is that doesn't have a visual it has a type but it'll also have some labels and it can be identified through those labels it can have child positions that can be occupied and reserved by dynamic objects most of the time you will have a court station at the position of the child
of the child position and when the entity is spawned it will be acquired and play a nice animation like the one you can see here it can be disabled but never deleted and we have a lot of static objects this is a 2d map this is a player's white piece that you can probably see this is one kilometer and this is five kilometers so you can see that we have a lot of static objects we have in egypt fifty thousand static objects for a weight of 15 megabytes this is five kilometers of the game so it's still big this is the type of static objects that we have most of them are location and animal locations but we have also a lot of spawners so the spawners are the objects that will create the dynamic object they will spawn them every static every spawner will automatically generate some spawning position to ensure they are not all spawning on the same spot and they will create some dynamic
so what is a dynamic object it can be a boat it can be a human it can be an animal you can be parented to another one like here you have a human on the boat so the human will be parented to the boat and all the characters are underlined by the meta in the game except one you can be virtual you can be in bulk state i will come back on that later it's when you are you have a very cheap visual representation and you can be real another video you can have an ai state that's what you are seeing when you are focusing on them with the eagle and this is represented by your current behavior and like the static object you can be identified by your type or by your
labels for the static objects the labels were static they will never change but for the dynamic object some labels can be pushed by your behavior according to what you are doing and once again you can be identified by that you can search for dynamic or static objects with a specific level nice play the video it's not going to look very great because this text is still going to be here but if i'm zooming out you can see that we have a lot of dynamic objects around the player and they're moving they are doing stuff and i should have some matrix okay we have 12 000 we have up to 12 000 dynamic objects loaded for a budget of 40 megabytes and if i'm displaying the same 2d it's
the same 2d map you can see that we have a lot around the player but as soon as you are going far away from the players are less because we can delete some of them like the crowds the animals we don't really need to keep them all the time but some are important to keep like the mission npcs and the guards that you killed in a camp and you can not delete them but you can make them hibernate that's the one that you can see in green and in this case that means that they won't be updated anymore but we will keep them so they will keep the inventory their target everything once again this is a representation this is what we have for dynamic objects most of them are humans and animals but we have some various dynamic objects like water vehicles we want the subject to move so for that we need to have something that will handle the long-range navigation and this is the ai network so this is the top view of the ai network in telemetry so what is the i network it's a graph
with nodes those nodes are going to be always on the left mesh they can be either generated or and placed uh two nodes two connected nodes will have a maximum distance or on 25 meters and always on the mesh static objects and child positions will be nodes but we have nodes that are not static objects or child positions between those nodes we have some links and those links can have some properties like can it be used by a human by your animal or by your boat and we have some lanes each dynamic object that can navigate will have a navigation profile and according to this navigation profile you will be able or not to navigate on the lane and on the link and to choose a line sorry isolated networks are supported it's super easy for us to check if for specific navigation profiles two nodes are connected so we can support isolated network and they are divided in sectors for hierarchical past training so doing
even if it's a huge huge map it's not super expensive to do a request i'm going to try to show the video so if i'm zooming out you can see that we have a lot of nodes and links we have alpha million nodes and alpha million links for budget of 100 megabytes we are also using we can also see the the eye networks we have lost my mouse we are also using the zi network in the game when we are auto following a road and in this case the player will follow this air network and we are even going to display it so it's not
only used by the meta ai so there are three states for for the dynamic objects the first one is a virtual state and i'm going to show you a nice screenshot of an object in virtual so obviously you cannot see anything but if i'm turning on the debug display you can see that we have a position we can have an inventory we can have a lever you can have a target and you can have a pass to this target along the i network that's the minimum that you need to keep when you're in virtual and you're not going to be updated every every frames obviously when you're in virtual you are going to be updated every 15 seconds by default if you're close to the player you're going to be updated every five seconds the second state is a bulk state so you can see here various objects in bulk so that's a very cheap representation of a of an entity it's
only one draw code there are no shadow the spawning distance for those bugs can can be will depend on the size of the object for a child it will be 250 meters and for a boat it will be two kilometers and they can be animated so you can see that they're animated it's a simple animation but when they are far it's not obvious so you can see that we have a very little very limited number of bulks models they all look the same every woman every man because they're really far from the player it's different from what we had on sonicate where we have a big variety of bulks and we were when they were getting close we were trying to spawn an entity that was looking like like the bulk so we have around 1000 bucks when you are in cities like in alexandria for example and they are dated every two frames when visible and one second when they are not visible you don't really
need to tick them each frame because the animation is not going to move a lot so we are going to update them one in every two frame video don't crash we are even seeing the bulks when we are meditating in this case on the bottom of the screen you can see that the boats are moving really really fast and it's not something that we can do with a wheel entity with physic components but here it's a bulk so we just update it with a big dt big delta time 25 20 times the regularity and they're going to move super fast and create these visual effects finally we have the real state it's when you have an entity with components so it can be animation physics ai components a lot of components when you're in a obviously it's a video when you are when you have an entity then you can fight with the player something that you cannot do in bulk or wheel you can take damages you can take hours
you can you have some particle effects you can play some sounds but this is going to be super expensive so you can pick up some objects but it's super expensive each component can be updated multiple times before and after the physics for example so it's really really expensive so we have a maximum budget of 200 objects in a in real estate the player have said that there is only one object one character that is not part of the meta eye and it's not the player the player is a is a is an object we have a player object obviously one it will never be in bulk or virtual but other objects will be able to target the player and to navigate to the player and to fight with the player the only one
that is not part of the meta is actually the eagle and one big reason for that is we don't really want the other npcs to shoot and kill the eagles so it's not part of the meta but the meta is not player centric it doesn't have any privilege and i have a video to prove you that so as you can see on this video it's really not player centric and other npcs don't care at all about the player and he can be pissed by that sometimes so in there is ai so we need to to have something so and this usually will be handled by virtual behavior so virtual behaviors will give a world to the object uh it can be to select a target to navigate to this target and to interact with this target it's a simple gameplay loop we have a couple of behaviors but most of the time it will be a go-to a patchwall can be slightly more complicated like an ambush
and for each dynamic object we have one main behavior and one reaction behavior the only reaction behavior that we have is actually the flea but we can persist the fluid virtual and keep on fleeing in the virtual space and it's only going to run on the root object so if you have a someone on earth only the horse will have a virtual behavior active that was an issue for us because that means that if you need us to navigate somewhere as soon as you as as you are on the earth you need to ensure that the behavior is pushed under earth and that the earth is going to select the same target and as soon as the entity is spawned in real estate it's going to drive the ai of the spawn entity our ai is working through a state chart and the virtual behavior will push some embedded state charts into this state chart so how this is working a small example here we have a behavior go to for a
range of 150 meters and the label will be location sleep for low class so we have an npc with this virtual behavior well this bed is too far this one is not connected it's on a separate ai network this one may be at the wrong label and this one is already occupied so we are going to use the closest bed it can be the closest to the npc or the closest to his spawner if we want to keep him keep him in a range around his spawner and to avoid him from going far away from the spawner now we need something to push those virtual behaviors on the dynamic objects and this will be needs so what is the need well you can have a set of needs like going to toilets sleeping eating or or healing and maybe this npc went to the toilets 10 minutes ago and now it doesn't need to go there is no bed nearby so he cannot sleep and his health is perfectly perfectly fine so he doesn't want to go and see a doctor
so he's going to eat those needs are organized and scheduled and you can have different schedules according to the time of day and here we can see the active needs the guy on the on the left is working and and the guard is socializing so another nice video so here you can see a guard for the moment i should try to move the text i'm sorry for the text for the moment he's eating but at some point he's going to decide that he needs to go to the toilet so it's going to navigate to the toilet there's a timer for the toilet need but the timer is not going to start as long as you don't reach the toilets because obviously you don't want the guy to start navigating and to do a u-turn after 20 seconds just because his need is uh is over just going to it's a long pass so i'm going to move it's moving that's really far
yeah it's it's a private area of the fort so am i here yeah i think it's here okay so now he's arriving to the toilet and if you can see the timer is going to go down let's give him some privacy and i will move at some point it's going to switch somewhere i don't remember where but the night schedule is because the night will arrive now it's a different uh schedule uh it doesn't need to eat anymore obviously everything is data different by the way so it's 90 seconds it's very long obviously but it's just because we want you to see that too many beers yesterday and at some point he will fulfill his need and he will do something else like socializing
and it's really nice for us because what we can do is with those needs and according to the number of resources that you're placing maybe here during the night you will have only four guards that will be active but during the day you will have seven guards because during the night maybe some guards are sleeping so according to the time of day everything will change and we have different behaviors happening in this camp and this should create imagine gameplay obviously because animals will have needs as well and one of their needs can be to eat and they can eat humans so on the top you can see a hippo arriving in the camp and start fighting with the guards and they will fight and at some point another one will arrive so nothing is scripted here it's all-imaging gameplay and these situations will happen the only thing that we needed to tune
actually was to disable fighting for animals in virtual space as there were there were dead bodies everywhere in the world and we wanted to avoid that we have groups in the world we have two types of groups in virtual space it's a video so the first one is the art group like the bodyguard here when you have an art group the group is created at spawn time and the followers will target the leader and always follow the leader and if you kill the leader then the group will be deleted and you have the soft group in this case the groups are created at runtime if you have multiple objects from the same factions that are navigating to the same target target they will automatically create a group and navigate together one leader will be elected but if you kill this leader another one will be elected and as soon as a group is created
they will try to always select the same target so to summarize the meta what disease it's 50 000 static objects 12 000 dynamic objects that are moving on the eye network in virtual real or bulk and we needs that will push via virtual behaviors so that's a lot of data and i'm going now to talk about performances and troubleshooting troubleshooting for that the first thing that we need to do i'm not going to play this video it's uh during the white room we are pre-rolling uh all the objects that means that we are going to update them a couple of times like take ten times with a big dt between 75 and 150 seconds and the goal is to spread them and to ensure that when you're starting the game everything is not at the same place and the world seems alive as soon as you're starting then we need to update so this is one
frame of the game at the beginning of the frame we are going to update all the groups all the avoidance and to manage the spawning then and this is single threaded it's around one millisecond in the middle of the frame we are going to update all the spawn units that's when you have a bulk or wheel entity we are going to update only the wood and tt the wood sorry object that will update its hierarchy and it's multi-threaded and it's 7 to 10 milliseconds and at the end of the frame we're going to update the mid-air object but it's going to be time-sliced because we just want to them to be ticked every 15 seconds so we just have a budget of one to three millisecond single thread and we will adapt this budget to ensure that they are updated every 15 seconds and if you need to pass along the i network then we are going to create a pass request and this is going to be an asynchronous task it's actually going to use a cpu idle time from the processor
then we need to debug that because that's a lot of data so how do we debug that we have some automated smoke tests that we can run so we can ah no no no no no no so we can envy our editor and we can load load a test map in our editor and ensure that there is no regression so here we have some guys navigating some guys fighting so we can load that and ensure that nothing has been broken by a change we are using a lot of telemetry and we are sending a lot of data when someone is playing a game so as soon as someone is playing the game we are tracking everything that he is doing and we can replay all these data in telemetry so we can check all the time where was a player and how many dynamic
objects were created how many static objects things like that so it was really useful to detect regressions every night we were doing a performance walk through that means that we were teleporting the player every 15 meters loading everything and doing a performance capture but we were not only capturing the cpu we were capturing everything and after that we get we can open the result in our brother in a map so here that the performance map i can see the the areas where we are not running at 30 fps and i can open a performance file but since we are recording everything with telemetry i can also check the number of dynamic objects and get a heat map of all those dynamic objects and i can focus so i can see if an area is too populated or if there are not enough npcs in this area or too many animals we can track that and obviously also to detect leaks
finally we have nightly reports we have nightly reports every night we are doing a lot of tests like checking if two static objects are still connected and if it's important for a mission and every morning we could receive the report saying how many errors were created and i'm not going to talk a lot about that because there was a talk yesterday from nicolas here about that and if you haven't seen it i would suggest you to to watch it on the on the vault now performances we switch from less than 100 to 200 npcs and we need it to do that because our spawning radius is bigger than before so we needed to optimize those npcs and especially the ones that are between 60 and 80 meters because that's a change in our spawning radius so we have introduced two new tech for that the first one is the component lod for load and demand we already had
lod for our visual components but not for every component and a lot of components were doing something like saying oh if i'm too far from the player maybe you don't need to to tick me but you know that the best optimization is to not call a function so what we did is introduce the component lod for all the components and you can be in low medium or high and visible or invisible so that's six lods and you can decide if you're going to switch from one component to another according to your distance or if you have a budget like 10i visible and you can even mix both and when according to your lod you can decide to disable completely a component or to reduce the update frequency or even to to be notified and for the for example in our ai component we are turning off the head look at when you are in low even visible because it's not something that you can see when you are far from the player the second take is a bulk animation
so we've seen that the bugs are animated but the animation is not as good as the one from the from the real entity but what we can do is to update the bulk and to copy the animation from the bulk on the real entity when they are far from the player hopefully this is going to that's two videos that's more complicated okay so so this one here is a real animation you can see that the fingers are animated that the feet are not sliding so it's a good looking animation and here you have the bulk animation going to move so with the bulk animation the fingers are not animated the feet are slightly sliding but if you are at 80 meters or 60 meters away from the player you couldn't make a difference between
those two animations i apologize normally one of top if you are playing one on top of each other and you could see the difference okay so that's the meta eye it's something quite powerful but we still need to improve some things first we have two navigation services one for the spawn space and along the nav mesh and one in bulk or virtual along the wall path and what can happen is you have an npc that is quite far away from the ai network and the reason for that could be that he was in a fight and he went far away from the eye network now we are going to unload this cell he's going to switch from wheel to bulk and now he cannot navigate anymore on the nav mesh so he will try to reach the ai the world pa the i network and do a straight line to the closest node and if the player is coming back while he will respawn inside this pyramid and this is actually
happening in the game and that's not something good it was not happening a lot we have a few solutions for that but it was still sometimes opening also for a long time doing the project we are not enforcing the density in the world and you could have a market with a lot of valid spots that could attract a lot of people but if everybody's coming it's very likely that we will have more than 200 dynamic objects nearby and that we cannot spawn all of them so what so what we did is to create a grid and they are all registered in a grid of 40 by 40 meters and in each cell you can have a maximum of 16 dynamic dynamic objects and this will include the ones that are inside the cell and the ones that are targeting an object inside this cell and when the cell is full they will try to select a target that is in another cell to try to spread everything it's going to be only for
non-mandatory npcs so not not for the mission npcs or for the merchants in the cities but another if you have an interior like here i'm going in an interior you have a lot of dynamic objects inside these interiors and they're going to use a density because in virtual we don't really know that it's an interior and when you're outside they will not be spawned they will still use an nct so we are kind of wasting them finally we don't manage emotions and it's possible for npc to be part of a cinematic but he doesn't know that and he has taken this is one of the saddest cinematic of the game it's a funeral of a little girl
and well you will see what happened in the wet square he will pay for this and all those who serve him so it's something that we cannot really control finally quest and meta-ai so quests are using the meta-ii first they will acquire objects from the meta ai it can be a specific specific target like cleopatra or it can be just a guard level for 15 or i don't know what just a specific guard if they just need someone to play a vo or something like that to play bark we have introduced new scripting operators and new virtual connection so they can push schedules on the sub dynamic objects and they can check their position we have some very specific behaviors for quest like the standstill and the
scripted go to but the good thing is now uh mission stencil is used sorry for cinematics and scripted go to it when you are navigating somewhere but we want to have a dialogue happening at the same time or something like that but the good thing is now mission designers are going to push goals on the npcs instead of micromanaging their behaviors so those guys will be able to react and adapt to to to what's going on so here i have a quest here we have a weeble the weeble in this mission has to go to the wound fort and he can use the horse sofia here is here to follow the weaver and she must wait for the player and bayek is here he's in this quest he has to escort suffer and doing this crate is open to bandits we have bandits in the world and here you are an opponent of the bandits let's play that
how many wounded enough that's why being close to their mind is so important and the fight is going to start so it's not something scripted it's not part of the of the quest just systemic so everybody's fighting [Music] okay it's dead so now everybody's going to read jimmy's goal you know what they have to do so he's going to go back on his horse sufficient is going to go back because she needs to follow him they're going to recompute a new pass on the iron network and they will resume what they have to do so it's really good for us that means that we can start a quest anywhere in the world we don't have to to put the mission giver at a very specific location you can move around
it's really really powerful for us to do that and there was on during the ice summit there was a talk from jamari santini about the quest if you want to look at that it will be also on the vault so close to the end so was that something good yes i think it has created a lot of opportunities obviously we had to change a lot the code it was a big change and some people seems have lost control about what they were doing because before it was way simpler for an inmate an animator to create a station and to ensure that there was always somebody in the station now the npc has to decide that he wants to go to this station but we have unified a lot of code everything is uh now done in the in the dynamic object you can in these behaviors it's not done from something outside the the npc
so it was a lot of work but at the end i think it was good and thank you for following that and if you have questions i'm happy to read i have a question when you're in assassin's creed origins and you have the eagle flying uh bayek can be riding on his horse to some destination yes if the eagle gets far enough away does bayek also become bulk or virtue no he's never becoming bulk is going always to stay spawned and even the horse is going to stay spawned but you cannot move at this point at some point it will stop moving and only the eagle will be moving okay thank you
hey uh thank you for that excellent talk um a couple questions uh can you speak at all to how the virtual node network was actually because you said it could be automatically placed can you say anything about how that was done uh yes but that would be a full talk uh basically if you have a word it can be automatically generated on the road you can also just create two nodes and create a link and at build time we will ensure that all the we are creating a path on the nav mesh and place some nodes uh we can do a lot of things about some templates that we can drag and drop there's a plenty of way to do that and cool uh is uh sorry one more question um do the bulks have any collision at all they can do avoidance they don't have collisions but they can do avoidance we don't do that between humans but uh when we have carts or boats we need them to avoid each other so there is no physics but they have conditions they have avoidance could the player like shoot an arrow at one no that's a that's why we have a bigger
spawning radius actually because we have the pred predator bow and we can shoot at 80 meters with the predator bow so we need to ensure that everybody spawn as you could shoot through a bulk and that would not be good okay thank you he literally just asked my question so so i had two questions uh first of all you're using nav mesh and also network like the ai network is it a performance reason that you have both like it's a memory reason there's no way we can load that i think our budget for the nav mesh is something like uh 20 megabytes and it's only for a couple of cells if we are loading egypt it would be almost all the memory of the games okay and my other question was we you were talking about like the the behavior and the needs and the camp that had guards and some were sleeping and some were still guarding what was deciding which one was sleeping like to make sure not everybody goes to sleep
it's a resources we wouldn't place 10 beds in a camp with a seven guards so the level designers will ensure that there is not too many resources and they can do to prevent that from happening okay thank you uh i have one question this might just be some confusion on my part with the grid system that limits how many dynamic objects can be spawned within a given area with co in combat if is if it's possible to for like a guards or whoever to kind of rush into one square on that grid could that be overloaded or how does that work i don't think that we would our fight system will attract so many people because the fight is already quite expensive so we wouldn't want to have a fight with so many people so i don't think that the fight will attract so many people not many people
yeah thanks great talk by the way um despite the video things uh i was wondering so you said that your budget for uh real npcs is 200 uh what's your budget for combat npcs i think it should be around 40. i think we have a maximum of 40. all right thank you okay thank you very much you
Auto-generated captions from YouTube — names and numbers may be misheard.
Game Developers Conference · 2026
Game Developers Conference · 2026
Game Developers Conference · 2025
Comments