Prepare Eclipse for game development

Programmers and computer scientist are just like babies. Learning something new (taking the first step) is difficult at first but then it gets easier. For example someone who wants to learn how to program, they have to choose whether to start with C++ or java or python or C or JavaScript and the list goes on. So many questions pop out. What IDE to use? Does that IDE work on mac? Can I program other languages in that IDE? Is it easy to use? ect.. But after this first step is taken things get easier from there. In this tutorial I will briefly discuss how to start developing 2D games for android using  Cocos2d-x .

Cocos2d x is a game framework written in C++ ,it is open source and it can be used to build games, applications and everything that requires GUI interaction with the user.One of the apps written in Cocos2d-x is Farmville  or badland and a list of other games built using Cocos can be found in this link .

Since Cocos2d-x is written in C++ you will need to modify eclipse to support C++ and download the android SDK. First download and install Cocos2d-X, go to and then click on the Download link.

Now you need to download the android NDK which you can get from . You should have the android SDK and Eclipse already installed on your computer. You can find tutorials that go through the installations by details if you don’t have them. To use the android NDK you will need some developer tools, You will need to go to and download Cygwin  which is a “large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.” This will make you run the shell commands to run your cocos2d.x projects.

Finally after you have the android NDK and Cygwin downloaded and installed, you will need to prepare your Eclipse IDE to support C++. Go to Help>Install New Software and then on the drop menu look for the version of your eclipse release and then scroll down to programming languages and check the following :

  • C/C++ Development tools
  • C/C++ Development tools SDK
  • C/C++ Unit testing support
  • Unified parallel C support
  • Unified parallel C Berkeley UPC toolchain support
  • XL C/C++ compiler support

Click on next ,let it install and you are ready to start making your first game . Good luck !