Does that work [on the replication layer] affect AI? And if it does, how? Does it make it easier? Does it make it more difficult? Talk to us about how the replication layer affects your work, if any.
TL;DRThe replication layer lets AI write data like players do, while moving AI between servers will require replicating their decision-making context and restoring correct states, such as dead or unconscious, so players don't notice switches.
So maybe I can start, and then you guys just interrupt me anytime. So I think basically, yes, it does impact us, as everything that we do. Basically, every AI character, especially humans, right, is very much similar; we do share a lot of stuff with the player. So we have a lot of things in common. The difference with AI is that obviously, right now especially, you have AI authoritative on a server, right? So what it means is that server meshing will come in different stages. First of all, we still have the split between the replication layer and the DGS. And then you have clients, right? So what it means is that usually the first step that you will get is basically that every change that the entities that the AI controls will apply is similar to other players. So they will write their own data to the replication layer; clients will read from the replication layer directly. So that is the biggest change that we will get. And in general, all the improvements that you get from the actor code and the actor team, we get it also in a way for free, because anything that the player can do, pretty much we want the AI to do it. So every change that they make from the player perspective also automatically applies to the AI. What I think will be more interesting in the new year with the replication layer is when we will have multiple servers and the way this can be expanded. Let's start just with the basics of multiple servers, similar to what we saw at CitizenCon with the demo from Paul. You will have characters that move across different servers, and this is the big difference between AI characters and player characters, right? Player characters are authoritative when you're a client. You guys play; your brain is the context that always keeps consistency between what you want to do and what you see the player doing, right? But on the AI side, when we move one character from one server to another and its authority changes, the big difference is that you don't only want to replicate the effects of what the guys are doing, but you also want to replicate the context of their decision making. Because if I'm fighting with you, yes, I could restart the behavior, but that means, as a first step, you might just select another character; you might see a bit of discrepancy from what they're trying to do when they switch server. And the main issue is that you as a player should not understand when you switch server. It should be irrelevant, right? So we want to have that type of experience as seamless as possible, like everything in Star Citizen. So this would be the biggest impact that we have, right? So we'll have a lot of servers, AI that might cross servers at any given moment, whatever they're doing, and that needs to keep the consistency between what they decide to do and what they're actually doing on the multiple servers, right? Server to server, obviously, it's a big change that we want to do. I don't know, Diego or Andrew, if you want to add anything there.
One thing I would say is we've been working on this recently. One of the challenges we've got is that, as things are now not all on the same server, they've got to be replicated. And not only that, well, that's server meshing, but also when you're coming back from the replication layer, say if that server's gone down or it's gone out of scope and you're coming back from it, you've got to restore them to the correct state, so that any AI that go up and see a character on that server and then interact with that are still getting the correct information to make decisions about what behavior they want to do. And so we've just been working on that very particular thing for a thing called the observable state, which allows us to say whether a character is dead or unconscious. And we found that because we've now split it up and it's coming back from the replication layer, it's not always getting this information updated, so you have an object that's basically in an unknown state, and then we get bugs because that information is wrong. So that's something we've been working on fixing, to make sure that that process is all done correctly and the information is there, whether it's for server meshing or for the replication layer.
Yeah, I'm imagining, hearing you guys talk about this, the idea you kill somebody and their state becomes dead, you pick up their body and you carry them over, and as you cross to another section, the replication layer brings them over, but now they're back alive.
Or they might perceive them alive, because another thing is that you need to make the state consistent, right? So for example, it could even be that you die, you get revived, but then the AI might think that you're actually still dead, or something like this. And then what will happen is, again, there are some situations where you might perceive it as they are not responding, but maybe it's just caused by the fact that maybe the state is correct in one side of the game, the components, but maybe it didn't get propagated correctly from the initialization order, or, for example, in this case, the knowledge of that state, right? So we are trying to split it so that we get better at the events, and we can read the states better, and we can propagate the events of the states much better, so that things are always consistent.