mixing cocos2d-x and cocos2d (iphone)

Hi,
first of all, props on the conversion you guys made !

We are currently trying to mix cocos2d-x and cocos2d.

First of all we completely refractored the cocos2d (iphone) engine. (CCDirector is now IOSCCDirector , etc…)

Now there is one issue that we do not seem to find, it’s the following sequence :

INIT and RUN cocos2d-x WORKS
PAUSE cocos2D-x WORKS
INIT and RUN cocos2D-IOS WORKS
PAUSE cocos2D-IOS WORKS
UNPAUSE cocos2D-x SHOWS BUT DOES NOT RUN
PAUSE cocos2D-x WORKS
UNPAUSE cocos2D-IOS WORKS

so as you can see, the switch works, but cocos2d-x does not “tick” anymore. Anyone have an idea what could cause this ?

It is needed for a project which we’ve been working on for 5 months, and for a new feature , that we want to implement later on in Android / Windows. So that we wouldn’t have to translate it all.

With friendly regards,
ekinsol

At first, I’m curious to the method you mix x withios.
Then, I require more more details & description on these words:
# UNPAUSE, do you mean CCDirector::resume() or CCDirector::startAnimation? Which functions do you invoke?
# “SHOWS BUT DOES NOT RUN”
# “tick”

We’re on holiday till Feb.11, so the reply is a bit delay in these days.

Thanks for your reply,

to clarify some things : I am trying to run the cocos2D-x (c++) engine, and the cocos2d-iphone (ObjC) engine in the same project, but not at the same time.

  1. I’m using CCDirector::sharedDirector()->pause(); to pause the engine, and CCDirector::sharedDirector()->resume(); to resume the engine.

This works when using the engine in a standalone environment, but somehow the Objective-C engine seems to break the functionality.

  1. I can see the EAGLView , and the sprites do draw on the screen. But animations and clicks do not work.

  2. With tick I mean that the engine does not take steps anymore to perform animations etc… While it does draw to the screen.

Enjoy the holidays :wink: !

With friendly regards,
ekinsol

When you use CCDirector::sharedDirector()->pause(), the director does not pause really. It only slow down the fps. And I don’t know you can mix them together.