What is the best way to run AI in Cocos2d?
I already have my AI implementations. Normally I would execute AI in my game loop by checking how much time has elapsed since last AI execution and whether I can execute it in the current situation, then finally execute it.
From my understanding, Cocos2d removes the concept of the GameLoop and replaces it with Actions, which is great, but I'm not sure how best to employ them to take over in this AI execution. My current workaround is to create a ccSequence that 1) Executes AI, 2) Executes another ccSequence that does the same thing (essentially make an Action loop). What I don't like about this is that Actions all have to be timing needs to be precise in Actions... but I can work with that.
Another thing I don't like is that while this is good for AI... what about rendering actions. I can easily render the result of my Action for me, but what about the result of another AI's action? Such as another AI killed me. I have to wait for my Action Sequence to execute before I can check if anything happened to me, but what if my action was 10 seconds long... do I stand there before I realise I should be dead?
I'm thinking now that I could have multiple Action sequences set up. One for my AI. One for general updates to me. But before I go too far down this path, are Action Sequences really a good replacement for ye olde Update methods?