People Innovation Excellence

Making Simple 2D Game using Cocos2d-x

Session01

Cocos2d-x Introduction and Configuration

Cocos2d-x is a suite of open-source, cross-platform, game-development tools written in C++. Cocos2d-x runs on top of OpenGL 2.0 and OpenGL ES 2.0. Cocos2d-x is one of the branch from Cocos2d open source software framework. Other branches of Cocos2d that have been used widely are Cocos2d-SpriteBuilder (later changed to Cocos Studio), Cocos2d-js (for coding using javascript), and SDKBOX (an integrated SDK to collaborate with 3rd parties SDKs). Why Cocos2d-x? It has several advantages which are: modern C++ API, cross platform, capability to test and debug your game on the desktop and then push it to a mobile or desktop target, and a vast API of functionality including sprites, actions, animations, particles, transitions, timers, events(touch, keyboard, accelerometer, mouse), sound, file IO, persistence, skeletal animations, 3D. These series of tutorials will discuss simple game development using Cocos2d-x with C++ programming language. The first tutorial will discuss the configuration of Cocos2d-x in Windows base.

  1. First thing first, the applications needed to be prepared are:
    • Visual Studio 2013
    • Cocos2d-x (http://www.cocos2d-x.org/download/)
    • Python-2.7 (https://www.python.org/downloads/)

*Visual Studio and Python-2.7 can be installed as usual while Cocos2d-x only need to be extracted.

  1. Next, navigate to the folder where Cocos2d-x extracted and copy it in the command prompt using this command: cocos new -p [package name] -l cpp -d [directory] [project name]

jt 1

  1. Open vcxproj file inside the project directory. In this example the path of vcxproj file is in S:\Cocos\Cocos01\proj.win32. The project loaded in Visual Studio will appeared like the picture below.

jt 2

  1. Rebuild the project by right-click on the solution and choose “build solution”. The process may take a while. After the build process has finished, you may debug it and the result should be like this:

jt 3

At this point, you have finished installing Cocos2d-x and run it using Visual Studio. In the next session, there will be discussions about basic programming using Cocos2d-x in Visual Studio.

source:
https://en.wikipedia.org/wiki/Cocos2d
http://www.cocos2d-x.org/
http://www.cocos2d-x.org/programmersguide/ProgrammersGuide.pdf


Published at : Updated

Periksa Browser Anda

Check Your Browser

Situs ini tidak lagi mendukung penggunaan browser dengan teknologi tertinggal.

Apabila Anda melihat pesan ini, berarti Anda masih menggunakan browser Internet Explorer seri 8 / 7 / 6 / ...

Sebagai informasi, browser yang anda gunakan ini tidaklah aman dan tidak dapat menampilkan teknologi CSS terakhir yang dapat membuat sebuah situs tampil lebih baik. Bahkan Microsoft sebagai pembuatnya, telah merekomendasikan agar menggunakan browser yang lebih modern.

Untuk tampilan yang lebih baik, gunakan salah satu browser berikut. Download dan Install, seluruhnya gratis untuk digunakan.

We're Moving Forward.

This Site Is No Longer Supporting Out-of Date Browser.

If you are viewing this message, it means that you are currently using Internet Explorer 8 / 7 / 6 / below to access this site. FYI, it is unsafe and unable to render the latest CSS improvements. Even Microsoft, its creator, wants you to install more modern browser.

Best viewed with one of these browser instead. It is totally free.

  1. Google Chrome
  2. Mozilla Firefox
  3. Opera
  4. Internet Explorer 9
Close