Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
falo
Posts: 97
Registered: ‎05-12-2009
My Device: PlayBook
My Carrier: 3

FYI: cocos2d-x: Crashes using CCUserDefault

For anyone building up a game for the PlayBook with cocos2d-x and the cocos2d-1.0.1-x-0.11.0 release from their site, there's a problem with CCUserDefault you should be aware of.  It took me a while to find the solution so thought I should share here in case anyone else is tearing their hair out.  Stems from a bug in the QNX implementation of CCFileUtils::getWriteablePath().  It's an easy fix and has already been submitted by someone so I expect to see it in future releases, but for reference here's the post that solved it for me:

 

http://www.cocos2d-x.org/boards/16/topics/7969?r=8031#message-8031

 

and the related pull request:

 

https://github.com/cocos2d/cocos2d-x/pull/707

 

Just swap in that code and all should be hunkydory no crashy.

-------
You can find me (sporadically) writing and developing at http://floor4.co.uk and gaming at http://uk-tf.co.uk
My Apps: Flip!
Please use plain text.
Retired
fernando_simoes
Posts: 25
Registered: ‎01-30-2012
My Device: Bold 9900

Re: FYI: cocos2d-x: Crashes using CCUserDefault

Thanks for the update! It's really nice to see more and more libraries and communities engaged on porting their work to our platform.

 

If anyone feel like describing a bit about how the current developer experience with Cocos2D-X is being so far (issues, suggestions), those are also very welcome!

 

Please use plain text.
Developer
falo
Posts: 97
Registered: ‎05-12-2009
My Device: PlayBook
My Carrier: 3

Re: FYI: cocos2d-x: Crashes using CCUserDefault

Once I've finished my port I'll start writing up a bit about the cocos2d-x experience (especially from the perspective of allowing developers to reach more markets with reduced overhead).  

 

One thing I will say is that it seriously need some improvement on is documentation, so I don't know if there's any resources RIM could throw their way to help with that.  First thing to tackle are the quick wins - I shouldn't have to drill into CCNode from CCSprite to find out that the rotation unit is degrees.  It'd also be nice to see, with each class, a couple of lines of snippet code as a very basic example.  The general impression I get from many of the docs & tutorials is that they're OK if you've used a similar framework, but they do make big assumptions about prior knowledge.

 

But, with the documentation aside, it's been a very painless process so far for me to port over and android game I made (using libgdx so had to re-write).  I'll be doing some refactoring at some point where I've made a bit of a rush job of certain things (fine from the user perspective, but I can't look at the code without cringing), but it does seem to lend itself to you doing exactly as much custom code as you want to achieve your goals.  That's something I really appreciate - I'm not forced into one way of doing things.

-------
You can find me (sporadically) writing and developing at http://floor4.co.uk and gaming at http://uk-tf.co.uk
My Apps: Flip!
Please use plain text.
Contributor
moadib
Posts: 24
Registered: ‎02-06-2012
My Device: developer

Re: FYI: cocos2d-x: Crashes using CCUserDefault

[ Edited ]

This someone is me :smileywink:

 

This https://github.com/cocos2d/cocos2d-x/pull/730 also maybe useful for someone. It makes me closer to inapp purchases & scoreloop integration.

 

But now i'm stucked by flickering on purchase windows in simulator. Doesn't know surely is it problem of cocos2d-x or simulator :smileysad:

Please use plain text.
Developer
falo
Posts: 97
Registered: ‎05-12-2009
My Device: PlayBook
My Carrier: 3

Re: FYI: cocos2d-x: Crashes using CCUserDefault

Kudos then matey. It really helped me at a time I was banging my head against my keyboard in frustration! Good luck with the purchase & scoreloop integration. Haven't tried it myself, but if I dabble and get anywhere I'll let you know.
-------
You can find me (sporadically) writing and developing at http://floor4.co.uk and gaming at http://uk-tf.co.uk
My Apps: Flip!
Please use plain text.