3 ms·
I don't know why AI shouldn't thread well, assuming there is more than one actor. As long as they are operating over an immutable view of the game state, each a
by asdfasgasdgasdg 6y ago
I don't know why AI shouldn't thread well, assuming there is more than one actor. As long as they are operating over an immutable view of the game state, each actor should be able to plan independently and enter its commands independently. Likewise, there are probably some tricks you can do with physics. And anyway in most games interactive physics is only done for a few objects in the game world, and those objects are often not interacting with each other, at least not physically. You could cluster the objects that can affect each other and then do each of them single-threaded.
- corysama 6y ago> As long as they are operating over an immutable view of the game state That's a big issue. There is a surprising amount of back and forth between objects in a single step of gameplay/AI. And, generally gameplay code tends to be a big mess of wild and ever-changing requirements from gameplay designers, extreme time crunch and short term (1 game then burn it) goals. Ivory tower software architecture it is not... Clustering physics into "islands" is common practice though.
- asdfasgasdgasdg 6y agoI'm not a game dev but I do know how software can become a mess. I think engines that are used by many games have a chance to push good practices here.