Back to search

How does that [server performance] affect the way that you program? Do you program this stuff for an ideal situation that maybe isn't always there, or do you have to adjust your workflow based on the current state of things?

TL;DRThey write behaviors both for the ideal case and to tolerate slow servers, using persistent states and reactive decisions, and they also design AI code (like caching) so it doesn't slow the server.

I think it's a bit of both. There are things that you need to do for the ideal case. Combat needs to be the ideal thing, in the sense that you want to have snappy decisions. Even in combat you have different approaches. For example, if you're going to cover, cover is a state where you can survive. It's like, I'm just in cover, I can make my calculations a bit slower while I'm doing some short-term decision that maybe doesn't require high performance. And it's the same with social. If I have a guy sitting on the chair, you can assume that there is a state that can persist and make sense. So if that one makes sense, then you can take the time that you have. Imagine that you have a guy reading a book. If he stands up in five seconds or in 10 seconds, it's not really important. The state can communicate what he's trying to do no matter what. And the idea of writing behaviors is a lot about this. You might stream in at any usable; you might start at any usable as a starting point. And then you might need to decide what is the best thing you can do. And deciding the best thing to do can take enough time. And also you might never find the optimal thing you want to do. You need to do those reactively. Maybe you are a janitor, you want to take the broomstick, and then the player arrives, and they say, okay, what do you do? So you always need to build your behavior in a way to handle the situation, of course. But sometimes it's also just bugs that we have due to the server performance that we see, and...

Andrew DaviesSenior Gameplay Programmer, Social AI

I would say as well, sorry, that the question is how much of the performance of the AI is based around the server performance, but also the server performance is based around the AI. The code of the AI can determine the server performance. We want things which are not going to slow down the whole server because lots of AI are processing the same thing. For example, with the usable calculations, trying to cache as much information as possible, so that if you have thousands and thousands of characters, they're not going to be slowing down the rest of the server performance and everyone else's experience just because they're calculating something which might be very cosmetic, for example.

Andrea CarboneAI Programmer, Ship AI

It's about not what the server can do for you, but what you can do for the server.

Yeah, I think this is distributed across all the departments. It's not just the AI.

Andrea CarboneAI Programmer, Ship AI

It affects everything. Even the IFCS... Every time, because we do predictions in a few places: based on the current position and velocity of the target, in the next frame it will maybe be here. One millisecond, two milliseconds is okay. Your prediction is fair. But if it's two seconds, it can be anywhere.

Jared HuckabyHost, Community

I think we could probably do a whole hour just on how important prediction is to AI.

Andrea CarboneAI Programmer, Ship AI

Yeah, collision avoidance, for example.

Star Citizen Live›A. I. and U·
Published on this date.20 Nov 2020