Chairs [NPCs standing on chairs]: what happens? Why does this happen?
TL;DRNPCs standing on chairs come from many different bugs, mostly streaming and sync-order problems between the character and the chair, that look identical; they are being fixed one at a time, and progress is real even if players don't see it.
So yeah, funny enough, this type of bug visually always looks similar. I think it's one of the oldest bugs we have. I think maybe four years ago we started to have people standing on the chair. And the bug at that time was completely different from the bugs that we have right now. I think one of the first ones I remember had something to do with animation: when the look pose was actually kicking in and causing the body to turn, the full body animation would kick in and it would just detach the thing from the chair or the couch. So there was one a long time ago. And then I think for a while we were in quite good shape. And then we started with object container streaming. And this is where I think we started to find more sync issues, in a sense. So basically, for people who don't know, the chairs in Star Citizen are pretty much what we call usables. Usables are pretty much just the representation that the AI has of how to interact with the world. So a chair is pretty much just an object where you can sit. And to achieve that, there is one part on the AI code that basically says, oh, there's something where I can sit. So how do I need to arrive to start to play the animation to enter into the chair? And then I play my idle on top of the chair. Then there is this coupling of these two objects, the character and the chair. And then there's the streaming code that can happen at different times. So when you are part of the chair right now, you're also part of the aggregate of the environment. So when the environment streams out, what should happen is that the attached objects should first stream out, that is usually the character, then the environment streams out. And then when we stream in, the environment streams in, and then the character streams in as well, and it knows that it should be attached to the chair. And then the request gets propagated to the different components of the character, and then the component decides to reattach it and put it in the right state. Right now we are fixing some of these components, of course one at a time. When we find a bug, we fix it. So far we've found that there were some issues with the fact that initially the usable was detaching the character before streaming out. So at that point we had lost the information; you restart, you don't know anymore. That was one. Then we had the sync of the events that were coming from the networking, and we fixed that. Then we fixed another bug that was related to the order of synchronization. So basically what would happen was that some characters could take a longer time to stream in. And in the meantime, some other character that streamed in earlier and was not attached to a usable might steal the usable from the character still streaming in. So in a sense, some of those bugs won't really be so important in the future once we have the simulation and once we have server meshing, because it won't matter that the AI is actually sitting there. The simulation will take care of saying, you know what, they should not be sitting there on the chair, or actually the chair should be reserved for this guy, and if the guy is removed, then it will just be cleared. Because the other issue that we had is, if we reserve that spot, we can't guarantee that that character actually streams back in, because there are characters that might be dynamic. So it may be that the chair remains forever reserved and the character never comes into play. So we already added some code that handles that. And now we found another bug that is under investigation. We are trying to solve it. Sometimes the character streams in before the object it's attached to. So we are handling this code a bit better, and we are trying to handle the fact that some of this order might be slightly different, even if right now that should not really happen, but we will also keep the state. And the problem is this ownership within this code. What we want to achieve as developers is to have code that is owning that state, so that you can tell, okay, I should be sitting there. Now, if the chair is not coming, I know it's going to come. So it doesn't matter if it comes this frame, next frame, in 10 frames or one second, but I know that this is my state and I should not run other logic to do other things, and complete the sync. This is basically where we are at. And of course, it's quite fun to see that it's always the guy standing on the chair. It looks like, oh, that's hard to fix? And it's like, yeah, no, but it's just a lot of things happening at the same time that give the same visual result.
It's actually an example of something that happens quite often in a lot of systems in the PU, where the same outward symptom can be caused by a number of underlying causes, and it can often look like no progress is being made in resolving the issue, but actually there's a crazy game of whack-a-mole going on underneath that you don't see. I see the change logs, I see the reports: resolved, resolved, and it still happens.
And I think the good thing is the progress is still happening. What I mean is these systems are getting much more stable. It's just that you as a player sometimes might perceive there is no change, but actually there have been a lot of changes.
And that's one of those things: it used to happen an awful lot, and now we're spending more and more time on the very small occasions when it happens, but because they're so visible and so recognizable, over time those things just show up.
That is generally a good thing. The fact that it's so visible and noticeable makes us find it easier. Because otherwise, if it was a hidden thing that only happened in a corner, that you only notice once in a blue moon, then you would run with a big system that might cause way more problems later.
Yeah. And I think this is also why we are not putting any kind of patch yet. The good thing for us is that this helps us stabilize the underlying system. Some of those bugs are not even necessarily AI-related per se. It's just that we are at the bottom of the chain. So if something goes wrong on the way, then yeah, the AI looks bad.