I’m currently working on a cross platform game for iOS and Android using cocos2d-x and it’s going really well, however I am struggling to find any way of integrating social networking / gaming functionality like Facebook, OpenFeint or Game Center. To make the game commercially viable it would be really beneficial to implement some kind of social gaming feature. Has anyone done this or could you point me in the right direction?
I am working integrating gammeta services with cocos2d-x. Gammeta client is developed with C.
More information on:
Thanks Diego, however it’s not so much the high score system of importance, but rather the promotional benefits associated with the big social platforms. I’m now looking at using cocos2d-android(–1) and iphone versions and porting the code as I go if I can’t find a solutions to implement, certainly facebook, with cocos2d-x.
So I recently released a port of a cocos2d-iphone game to android using cocos2d-x, called Chirp Chirp.
As the iphone version used openfeint, I also integrated that too. Integrating highscores, anchievements and some buttons to access the OF dashboard and login a user was very easy - only about 5-6 JNI calls.
However, I wasn’t too happy with openfeint, as the iphone version has far more features than the android version. So today I updated the game to use scoreloop instead. The whole process of changing from one to the other took about a day.
You might find that the JNI code is the hardest part, as I foudn its not very well documented. However, it was easy enough to just see how cocos denshion does it, and copy that code.
You can download the game here:
Just thought I would report back on this. I decided to switch development to cocos2d-android as I have more experience with the Android SDK and this worked very well. I have now ported the game to Cocos2d-iphone and am just finishing off the Scoreloop integration on iOS (although having some issues).
Having had some spare time, I created a test project with the lates 2d-x release and have also got the jni - ndk calls working so shall be returning to cocos2d-x for the next project!
Thanks for all the responses!
Welcome back, 2d-x is for lazy coders just like me.
Have you compare cocos2d-android with cocos2d-android-1, which one is more stable?
Hey. I used android-1 because it seems more active. There certainly are issues and it doesn’t run as smooth as the iphone ( out soon ) version but it was enough to get the game finished and published for such a basic game. The game is called Spike Attack and is available as Adware or Paid version ( same game content ) on Android Market, Amazon and Getjar. Any feedback is always appreciated.
Androd Market: https://market.android.com/details?id=com.silvanite.spikeattack.adware&feature=search\_result
Awesome! You get 5 star on this game, congratulations!
The co-author of android-1 is my friend in ShangHai, his port is so amazing.