cocos2dx support for marmalade

hey can any one tell me whether new cocos2dx 2.0.4 supports marmalade 6.1.2.

coz i am having problem porting an existing game to marmalade 6.1.2 because of SysGlesVersion=2.

Hi Jay,

You can you this branch https://github.com/mrmop/cocos2d-x
in order to work with Marmalade 6.1.2 and cocos2dx2.0.3

I think mrmop is doing a great job adding the support for Marmalade.

Cheers!

Óscar García wrote:

Hi Jay,
>
You can you this branch https://github.com/mrmop/cocos2d-x
in order to work with Marmalade 6.1.2 and cocos2dx2.0.3
>
I think mrmop is doing a great job adding the support for Marmalade.
>
Cheers!

i downloaded the cocos2dx link which you gave me.
i also did all the settings for using marmalade mentioned over there but still i am getting some errors.
can you please tell me how does it work with marmalade coz i read on a post that cocos2dx-2.0 does not support marmalade.

Hi Jay,

I’m using that branch with Marmalade 6.1.2 and everything it’s working nice! what problems do you have?

Cheers!

Óscar García wrote:

Hi Jay,
>
I’m using that branch with Marmalade 6.1.2 and everything it’s working nice! what problems do you have?
>
Cheers!

i have downloaded the cocos2dx which was mentioned by you and also done the necessary things for marmalade, but the cocos2dx which you mentioned does not have the template for marmalade.
i guess you understand what i am trying to say, i mean how to use marmalade along with that cocos2dx.

i am porting my existing application from marmalade 5.2 to 6.1.2 for windows os.
i am porting it for intel ultrabook which has higher graphics version and supports the later version of marmalade i.e. marmalade 6.1.2

the problem is that in my app.icf file when i use “SysGlesVersion=2.0” it gives me an IWassertFailure.
and i want to use SysGlesVersion=2.0 in my app.icf file.

any help will be appreciated.

and thank you very much foe your reply

Hi Jay,

You don’t have to put SysGlesVersion=2.0 in your app.icf file because Marmalade 6.1.2 uses OpenGL ES 2.0 as default.
Have a look to the Hello project. You will find a Marmalade folder in which you will find a .mkb which you can use
as a template for your project.

I hope it works!

Cheers!

Óscar García wrote:

Hi Jay,
>
You don’t have to put SysGlesVersion=2.0 in your app.icf file because Marmalade 6.1.2 uses OpenGL ES 2.0 as default.
Have a look to the Hello project. You will find a Marmalade folder in which you will find a .mkb which you can use
as a template for your project.
>
I hope it works!
>
Cheers!

hey Oscar,
thank you very much for your reply.
i have got it and i am able to start the application now but the only thing that is bothering me is support for “box2d”.
i am using box2d in making the game and i dont know how do i include the header files for box2d.

please help with this also and thanks a lot again.

Hi Jay,

You shouldn’t have too much problems using box2d with cocos2dx and marmalade. I’m not using box2d in my project but I think
you should just adding Box2D to your subprojects section in the .mkb file.

Have a look to the TestCPP.mkb (samples\TestCpp\proj.marmalade) flie in which you will find all the relevant things to include Box2D to your project.

Cheers!

Óscar García wrote:

Hi Jay,
>
You shouldn’t have too much problems using box2d with cocos2dx and marmalade. I’m not using box2d in my project but I think
you should just adding Box2D to your subprojects section in the .mkb file.
>
Have a look to the TestCPP.mkb (samplesTestCppproj.marmalade) flie in which you will find all the relevant things to include Box2D to your project.
>
Cheers!

hey oscar,
thanks a lot for helping me.
my game has started working.
thanks again.

hey oscar still i have a question which is not of marmalade 5.2.2 and cocos2dx 1 which i want to ask you.

i developed a game for playbook using marmalade.
we had send the game for testing and it got rejected coz of 1 reason.

when i play the game continuously for 45-50 mins and switch from gameplay scene to menu scene then almost all of the menu images gets disappeared and and those images are displayed with white patches, whereas all the written text which are labels are as it is and nothing happens to it.

the reply from marmalade said that the white patch appears coz of memory leaks.
can you explain me how to find memory leaks in a marmalade project.

i have heard of metrics for checking leaks but it is lil difficult to understand.
can you suggest me of something.

it would be very helpful of you oscar if you help me in this.

thanks a lot for all your reply.

Hi jay,

I think in order to catch any memory leak in your program you should use
the memory manager which comes with Marmalade to use it you have to inititialize
the IwUtil module at the beginning of your program and uninitialize it at the end,
after that any allocation should be registered, then if you exit from your program
an assert will be triggered telling you there is some kind of memory leak.
in order to see when this memory was allocated you can use the section

[Util]
MemoryBreakpoint=id

in your app.icf where id should be the allocation id Marmalade gave you when you exit the
program. The launch again your program and it will stop when the allocation happends and
you could see whats wrong.

I hope it helps!

Cheers!

Óscar García wrote:

Hi jay,
>
I think in order to catch any memory leak in your program you should use
the memory manager which comes with Marmalade to use it you have to inititialize
the IwUtil module at the beginning of your program and uninitialize it at the end,
after that any allocation should be registered, then if you exit from your program
an assert will be triggered telling you there is some kind of memory leak.
in order to see when this memory was allocated you can use the section
>
[Util]
MemoryBreakpoint=id
>
in your app.icf where id should be the allocation id Marmalade gave you when you exit the
program. The launch again your program and it will stop when the allocation happends and
you could see whats wrong.
>
I hope it helps!
>
Cheers!

hello oscar,
thank you very much for your reply.
i appreciate the you respond to my questions.

you mentioned using memory manager for checking leaks.
but since i am completely newbie to memory management, i dont know how to use it.
can you provide me with any tutorials or any example or elaborate more on this, coz this is now making me trouble.

i get a message saying “Memory debug manager max number of blocks reached. Memory metrics & posioning may not function correctly” after playing the game continuously for sometime.
can you tell me what to do with it.

i am stuck up with this issue for last 4-5 days and relly dont know how to deal with it.

kindly help me in this.

Hi I am using the following.

  1. cocos2dx 2.1.5
  2. marmalade SDK 6.3
  3. Font Used attached with post .ttf
  4. Target deployment on Windows phone8 and android through marmalade deploy tool.
  5. example pngs attached

I am trying to add a CCLabelTTF font but due to some reason the text wraps around. I am doing this in the code

wholeNumberLabel_ = CCLabelTTF::create(“0”, “futura.ttf”, 42.0f);
wholeNumberLabel*>setAnchorPoint);
wholeNumberLabel*
>setPosition~~ wholeNumberLabel*>getContentSize.width/2, divisorLine>getPositionY));
this~~>wholeNumberLabel*>setColor);
scoreBG
>addChild(this->wholeNumberLabel_);

After sometime in code I do change its string for numbers like 11, 15, 26 the text wraps around. Attached is a screen shot.
If I do this same in a different android project then there is no such issue. If I do this through proj.marmalade and try to deploy it on windows phone 8 or any android device text wraps around. Even the simulator gives the same if we load .mkb and run as x86 debugger through Visual studio 2012 on Simulator.
I have also changed the contentsize but still no use.