Re:The Strange, Unfinished Saga of Cyberpunk 2077
by Gene_Parmesan on Saturday December 11, 2021 @05:26AM
(#29519894)
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.
Re:The Strange, Unfinished Saga of Cyberpunk 2077
by KptMarchewa on Saturday December 11, 2021 @08:55AM
(#29520852)
You don't really need to rerun your AI logic every frame though. It's more than enough if you do it every ~second, and can compute it on a separate thread.
Re:The Strange, Unfinished Saga of Cyberpunk 2077
by hutzlibu on Saturday December 11, 2021 @09:06AM
(#29520930)
That depends on the type of game. The game I am working on would not work with a AI update every second.
Re:The Strange, Unfinished Saga of Cyberpunk 2077
by leetcrew on Saturday December 11, 2021 @10:34AM
(#29521549)
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.
How can that be a thing of what you say is true?