Cocos2d-x Developer Blog

Setting up Facebook app for SDKBOX services


In order to correctly avail all the Facebook services provided by SDKBOX, follow the steps as mentioned in this article.


Create a Facebook App

Go through the following steps mentioned to create a Facebook App –

  • Before you start to create a Facebook app, register yourself with a Facebook Developer account. Please go through the link and click on Create Developer Account button and go through the process as being asked by Facebook.
  • After being registered as Facebook Developer, please go to
  • Click on My Apps, and select Add a New App.
  • Select any platform that you want. (iOS/Android/Facebook Canvas/Website), you can add other platforms once your app is created.
  • Now click on Skip And Create App ID button.
  • Now you should be presented with a popup window asking for Display Name, Category etc. Please fill it and then click on Create App ID button.
  • By this time your app would be created and you will be redirected to the Dashboard of your app.


Configuring your Facebook App

Congratulations now !
You have created a Facebook App, but you are some steps behind to make it to work. Please follow up the configurations steps to make your Facebook App live.

  • Go to the Settings panel in your Facebook app and please fill the Contact Email field and save your changes.
  • Now, go to the App Review panel in your Facebook app and click on the live status slider button to make your app live.
  • After this you should be able to see a green dot next to your app name. If so, then your app is live and ready to use.


Adding supporting platforms to your Facebook App

Now as you have a live Facebook App, you should be adding supporting platforms into it. Basically we need to add 3 platforms to support Android and iOS.

  • Go to the Settings panel of your Facebook App and click on +Add Platform button.
  • Now, select Android from the list, then fill the package name of your game/app and keyhash to use Facebook services inside your app.
  • Now, similarly add iOS platform for your Facebook app.
  • In order to receive notifications and app invites in your desktop browser you must add Facebook Canvas support to your app also.


Adding User Roles to your Facebook App

In order to send app invites to your friends and your friend receiving app invite notification, you must add them as Developers/Testers as per your preference. When your app is in Development mode then only testers/developers can get invitations from you. Please go through the Roles panel of your Facebook app to assign roles to your testers to check app invites in Development mode.
NOTE: If you expect your friends to receive notification on their desktop web browser, then you must add Facebook Canvas as platform to your Facebook app.

Now, you are ready to use your Facebook app for SDKBOX services.
Please go through the documentation for detailed use of Facebook plugin.


Posted in programming Tagged with: , ,

Interview with the team behind RatNRoll

The team behind RatNRoll tell us about using Cocos2d-x to develop their new game! Take a read:

1. Tell us where you came up with the idea for this game. What were your inspirations?

top-bannerHard to tell where the inspiration exactly came from. We were experimenting with various ideas on how to control the game with simple touches and at some point we thought that was it! And the idea for the main character? We thought rats are underestimated in mobile games business :-)

2. What version of Cocos2d-x did you use?

Posted in Business Tagged with:

Grabbing OpenGL frames with Android Studio

An OpenGL Frame Grabber allows us to analyze all the OpenGL function calls that render a particular frame. With it, among other things, we can find performance issues and rendering bugs. A few months ago, OpenGL Frame grabbing capabilities were added into Android Studio.

Warning: Android Studio’s OpenGL Frame Grabber is currently tagged as experimental

This is how we use it for Cocos2d-x games.

Create a Cocos2d-x game and compile it for Android Studio + armeabi-v7a

Create a C++ game, but it could be a JS or Lua game as well:

We should add the armeabi-v7a support by adding “APP_ABI := armeabi-v7a" into the file (by default it will only compile it for armeabi).

After adding that line, it should look like this:

And we should add the following C++ code snippet. Just edit the mygame/ file and add the following lines:

After editing the file, it should look like this: main.cpp

After those changes, we are ready to compile it. Just do cocos compile -p android --android-studio

(pay attention to the "--android-studio" option). Example:


Posted in programming Tagged with: , ,

Interview with the team behind “Water City”


The team behind Water City talks with us about using Cocos2d-x to create their new game.

1. Tell us where you came up with the idea for this game. What were your inspirations?

Screenshot_2016-01-06-21-36-30We developed the game during a Game Jam in our home city, and the event organizers provided the theme/topic of the game, which was water conservation. After researching for a while, we realized that to conserve more water there has to be a joint effort on the part of both the government and each and every individual in the community. From these insights we decided to make a game where the player has to develop a city through different social projects centered around technology and education.

Posted in Business Tagged with:

Handling Non-Consumable IAP items using SDKBOX


Handling your IAP items is quite an easy task, if you are using SDKBOX plugins.
You need to be cautious with the following quick-checks to handle your IAP items.

This post primarily aims at informing developers the correct way to implement and test Non-Consumable IAP items using SDKBOX IAP plugin.


Setting up IAP using SDKBOX

At this point of time we assume that you have installed the IAP plugin from SDKBOX and are ready with the sample code injected into your sdkbox_config.json. If not, please go through the link –


Posted in programming Tagged with: , ,

Solu uses Cocos2d-x for their “personal cloud computer”

Solu is a company building a completely new type of cloud-linked computer! They are using Cocos2d-x for their front end GUI needs. Kristoffer Lawson, CEO and Juha Laitinen, Lead Frontend Developer talk with us.

1. Tell us where you came up with the idea for Solu. What were your inspirations?

solu_link_cloudThe idea for Solu actually goes back at least 15 years or more, when I first started working with the Internet. It struck me as ridiculous that we have these huge resources of the Internet but we were still struck with computers that merely connected to it, but did not utilize those resources, meaning having to worry about things like hard drive space, backups and installing applications. Our work model was still based around the ‘personal computer’ model with collaboration being a complex afterthought. That is still the situation today. Our computers and computing experience is, to put it bluntly, much more complex than it needs be. At Solu, we are building a computer experience where the user no longer has to worry about their IT through a cloud-linked, collaborative OS. However it is one that also works offline, and provides a real local and native experience.

2. What version of cocos2d-x did you use?

We’re currently on 3.4 but are in process of upgrading to 3.9 mostly due to bugs being fixed.


Posted in Business Tagged with:

Interview with Pedro Soares, author of World Soccer Challenge

Today, we talk with Pedro Soares, the author of World Soccer Challenge about how he made the game with Cocos2d-x. Let’s hear what he has to say!

1. Tell us where you came up with the idea for this game. What were your inspirations?

screenshot1In 2012, I created my first game and it was a success. Elastic World was selected by Google to feature on the top banner of the first page of Google Play and it went straight to the top of the charts in that weeks. It was a game developed over six months alongside a full time job. The Android version was implemented in Java and the iOS version in Objective-C.

In 2013 I decided to create World Soccer Challenge, a soccer game about World Cups and inspired by the classics of the past like Sensible Soccer, Kick Off and Championship Manager. This time, instead of coding separate versions of the game for iOS and Android I went to Cocos2d-x to be able to code only once.

But games like Sensible Soccer were designed for computers with joysticks and its gameplay experience it’s impossible to recreate on mobile devices with touchscreens. So I had to get inspiration from other mobile soccer games, like New Star Soccer (my favorite mobile game), Score! and Flick Kick Football.
World Soccer Challenge took me two years to develop and release.

2. What version of cocos2d-x did you use?

The first version of the game was released with cocos2d-x 3.8. But the next version coming out this week with several bug fixes uses cocos2d-x 3.9.


Posted in Business Tagged with:

Success continues for the latest meet-up, held in the Dominican Republic.

The last Cocos2d-x regional meet-up was held on December 19th, in the Dominican Republic. Raydelto Hernandez, coordinated this meet-up. 9 people attended this event. The event was streamed online via: and was recorded. Enjoy watching it!



Posted in Business Tagged with:

Integrate IAP for AppStore with SDKBOX


Getting IAP working for the AppStore basically involves the following major steps –

  • Adding iTunes Connect record for a new app.
  • Integrating Purchase logic in your code.
  • Creating IAP products in iTunes Connect.
  • Using Test Flight to test your IAP.


Setting up IAP in iTunes Connect

Before integrating IAP into your game, you have to create a record for your iOS application in iTunes Connect.


Posted in programming Tagged with: , ,

Interview with the developers of “Game of Threes”


Matthijs and Tom took time to talk with us about developing “Game Of Threes”. Read on:

1. Tell us where you came up with the idea for this game. What were your inspirations?

About 3 years ago Matthijs went to India for an extensive IT training related to his day job. In his limited spare time there he started playing mobile games just to relax and get his mind of the studying. He was inspired by the way mobile games were rolled out to the user base, the graphics and the user engagement. When he came back and enjoyed a beer with Tom they both got inspired by the whole concept of mobile gaming. Matthijs has an IT background in developing line of business applications, Tom a great portfolio on designing and photography. We came up with the idea of creating a game, having no experience whatsoever

We just said: Okay we will start from scratch to learn how to create and release a cross-platform game.

The match-3 genre was compelling to us.

We’ve been working on this game for about 2 and a half years on and off. Tom went on a sabbatical after a few months and in the meanwhile the development was stalled for a couple of months. When Tom returned we decided to continue our efforts but start over from scratch using what we knew at that time. A lot of progression on developing the gameplay has been made ever since. The Windows Phone contest was an incentive for us to work on a release-ready version. After that release, based on user input we concluded the gameplay still had to be improved. It was an ongoing process.

2. What version of cocos2d-x did you use?

We started of using cocos2d-x 2.0.03 in the early days before we actually had a working game. After Tom’s break we started working with cocos2d-x 2.1.

Our development process took quite some time. When Tom came back the framework had progressed in a major way. We started using version 3.0. We also started using Coco Studio v1 instead of cocosbuilder. Both the framework and Coco Studio made quite a progression in this time. We had to upgrade a lot to keep up with the Coco Studio development and all the bug fixes as well to make use of the features provided. Especially the features related to rendering Coco Studio scenes, nodes and control. We knew while we started that Coco Studio was still in beta. In August we released the demo of our game to participate in the Windows phone contest. Thus we had to upgrade to version 3.6 to get the Windows Phone back-button working, there by complying with the Windows Phone store requirements. We kept on using this version till our release as not to break any existing code.

In the future, with the new SDKBox updates and the improved Coco Studio support, as well as the Windows Phone mp3 support we will certainly upgrade to the next version when we continue development.


Posted in Business Tagged with: