I’m working on a turn based strategy game where the AI will do some very heavy decision making at the beginning of its turn. While this is going on, the game appears to freeze for about a second before continuing. How can I make the game just sit there without the big hiccup while my blueprints are determining what the AI should do during it’s turn? I tried calling the event that starts the AI Turn processing through a timer, but that hasn’t helped. Thank you
Do it in another thread?
That would at least not freeze the game, as the gameloop can run while you process. You still have to wait for the results, no way around that.
Edit: I see this is in Blueprint scripting - I do not know if you can do Threading there natively, but it should be possible to do a simple C++ threading part, that just calls your Blueprint code.