I am making turn based game. My AI has excessive calculations to do before every turn, and I believe these should not be optimised any more. They cause a sharp and short framedrop, that affects animations and actions coming afterward. Is there any way I can tell the code to calculate it calmly and start the animated actions only when the frame is back to normal ??
I also implemented all main calculations in one compressed line, like in this pseudocode :
Should I fragment this line into smaller parts to improve framework, or is it not necesarry ? Or should I use cascade of yields ?