I am making a game where the computer player runs a routine recursively to find the best move. As the moves get more complex this routine can take several seconds to complete. That’s fine except that it blocks the main thread and my animations stop until the routine is done.
I want to put that routine into a separate thread but can not find any useful information on how to do so in a cross-platform way.
Can someone who has successfully done multi-threading please provide advice on how to accomplish this. I need a method that will work across all cocos2d-x supported platforms.
It doesn’t have to be a separate thread, if there is a way to do this without it that would probably be even better.
I’m fairly new to this framework and so far I think it’s fantastic.