top | item 29519438

(no title)

s3tz | 4 years ago

CDPR doesn't iterate and test their code in the optimal way. Most of the time they just go at it full on and patch things up at the end. This was (un)fortunately for them a project where the complexity rose so high that their approach couldn't handle it (also covid didn't help), and they were left with intertwined systems that were causing severe performance bottlenecks everywhere (think polynomial or even exponential). AI the way they planned it meant spawning hundreds of NPCs, all interacting with one another and the player, with badly designed systems for that interaction (because why spend upfront time on this if you can floor it), and almost no consideration on how that would impact the graphics and physics sides of the game. The whole development of this game is a case study of how to fail at keeping your externalities in check.

discuss

order

moksly|4 years ago

That doesn’t make a lot of sense though. In my country first year CS students build game of life versions with thousands of not millions of individual entities all going about their business and interacting with each other in some shitty math based programming language, using math they typically get from Google because it comes from biology.

How can that be a thing of what you say is true?

Gene_Parmesan|4 years ago

I would say first, that's the power of exponential complexity. Second, AI in games tends to consist of somewhat complicated goal-based & fuzzy logic behaviors. Third, game AI agents have interactions that take place within a 3d world that has to be modeled accurately. That means lots of expensive computations for things like line of sight, pathfinding, and so on. Finally, given that games are soft real-time and include remarkably expensive 3D rendering, the compute budget available for AI functions I would guess would be somewhere around the order of 2ms per frame (on a 16.7 ms frame, for 60fps).

Though, two through four can usually be handled without issue, provided the devs know what they're doing & architect the engine correctly. (edit: And keep the scope in check, which ultimately is the responsibility of the leadership.) Unfortunately, this appears to be where #1 messed things up for them.

leetcrew|4 years ago

are we talking about the same game of life? in conway's, the update logic for a cell depends only on the immediate neighbors of that cell. so the time to update an entire frame is O(m*n), which is not hard for any matrix size that would reasonably fit on a laptop screen.