If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
New Contributor
mkm_dz
Posts: 7
Registered: ‎10-18-2011
My Device: Playbook
My Carrier: Iusacell

Cocos2D

has anyone been able to install and create a project using cocos2dx? Can you post a step by step guide on how to do it? Thx a lot!

Please use plain text.
New Contributor
alecgdouglas
Posts: 3
Registered: ‎11-06-2011
My Device: Playbook
My Carrier: None

Re: Cocos2D

I'd also love a guide for this.

Have you had any luck so far mkm_dz?

Please use plain text.
Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10
My Carrier: Platinumtel

Re: Cocos2D

I have got it working.  The first time I did it was in Windows XP with a PlayBook device running the beta OS 2.0.  Then I got the same thing working on Ubuntu 11.04.  Here's what I did:

  1. Download a zip snapshot of the latest cocos2d-x from blackberry.github.com
  2. Unzip, then go to momentics IDE, right-click in the "package explorer" and import
  3. Choose "existing projects into workspace"
  4. Browse to the folder with cocos2d-x and choose it
  5. Build all.
  6. Import existing project into workspace again, this time browse to "HelloWorld" inside cocos2d-x
  7. Build again, then right-click the HelloWorld project and then Run As->BlackBerry C++
  8. Follow the wizards to setup the playbook device connection

Before all this I had already setup signing keys and the debug token.  For me it just worked the first time.  When I downgraded back to PlayBook OS 1.0.7, I had to fix a couple build problems.  They were in the blackberry-tablet.xml file, and the momentics IDE highlighted the errors.  One of the problems was a file written as libgrskia.so.1, when it needed to be simply "libgrskia.so".  The other problem I right-clicked on the "error-underlined" part, chose Quick Fix, and the IDE put the correct path.  After that it works, both in Ubuntu and WIndows XP.

 

I exchanged email with mkm_dz, and he was having trouble getting it built, and I gave him basically the same steps.  He is running Mac OS X, and I don't know what playbook OS he is running.  He still had not discovered the problem last I know, but I have not heard from him for a while so he may have solved it now.  All this was before I downgraded to OS 1.0.7.

 

It's a very nice engine to work with, I have had lots of fun so far.  It's worth the trouble to figure out how to make it work.

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
Please use plain text.
New Contributor
alecgdouglas
Posts: 3
Registered: ‎11-06-2011
My Device: Playbook
My Carrier: None

Re: Cocos2D

Awesome, that's exactly what I was looking for!

I'll try that later when I get home from work.

Thanks a ton, cycletronic!

Please use plain text.
New Contributor
mkm_dz
Posts: 7
Registered: ‎10-18-2011
My Device: Playbook
My Carrier: Iusacell

Re: Cocos2D

Hi, i just can install cocos on a mac (running snow leopard) ithink im really close but i just cant. If i resolve this issue im creating a tutorial with all the issues i have solved till know. this is the status of my "project"

  • Compiled cocos2dx
  • Compiled helloworld but when i try to run it on the simulator (1.07)or a blackberry playbook it crashes and shows:
    • unknown symbol: virtualkeyboard_show
      unknown symbol: virtualkeyboard_get_height
      unknown symbol: virtualkeyboard_hide
      unknown symbol: navigator_request_events
      unknown symbol: navigator_rotation_lock
      ldd:FATAL: Could not resolve all symbols

If tracked this error to the cocos library (cocos2dx/platform/qnx/CCEGLView_qnx.h) i dont know why it show error in this functions. Any help would be appreciated. (Attaching image with errors)

Please use plain text.