Welcome to the iMore Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By supersuraccoon
  1. Thread AuthorThread Author   #1  
    supersuraccoon's Avatar
    iMore Newbie

    27 Posts

    Default A simple guide to cocos2d-extension

    I have just tried it recently and found there is no guide shows how to use it in detail and it is a little bit confusing for beginners like me. So I worte this guide on how to compile and run all the test demos attach to the cocos2d-extension source code and how to add part of the function(s) to your own game.

    I also made a video on this you can check it out here:

    Get the Video Player
    Environment in demo:
    cocos2d version: v1.0.1
    cocos2d extension version: v0.1.3
    xcode version: v3.2.5

    OK, now let's get this thing on the road

    1.Get the latest cocos2d-extension source code
    There are two ways to get this done.

    (1) Download from the gitbub page (in this guide I used the latest 0.0.3 version):

    (2) Use the git command to get the latest version of cocos2d-extension(you'll have to install and setup git anyway):
    git clone --recursive https://github.com/cocos2d/cocos2d-i...extensions.git

    2.Unzip the source code to anywhere you want

    3.Open the ios versin project with xcode

    4.Delete the "cocos2d" folder inside the source code

    As you can see there're no files inside that folder so we simply delete it now

    5.Add a new folder "cocos2d source" then add the following stuff to it:

    (1) "cocos2d" folder from the cocos2d source folder

    (2) "FontLabel" folder from the cocos2d source folder

    6.Right click the "cocos2d source" folder, select the "Get info" then in the target tab check the "cocos2d libraries" item

    7.Now you should be able to compile and run all the demos with no warnings and errors

    To add part of the functios to your project is quite simple:

    1.Add a folder in your project say "cocos2d extension" folder

    2.Drag and drop the functions you want from the "cocos2d-extension" folder

    And that's all, feel free to ask any question here and I'll try best to answer them if I can

    I tried to post all the images from my site but it just won't work
    here's the org post on my site:

    A simple guide to cocos2d-extension | SuperSuRaccoon's World
    DoodleDudeDan likes this.
  2. #2  
    joteykj's Avatar
    iPhone Newbie

    19 Posts


    Thanks for your effort. I like the ScrollLayer sample, it is useful for my future apps. Thanks!
  3. #3  
    Joe Pitto's Avatar
    iMore Beginner

    54 Posts


    Sure its useful for some.
  4. #4  
    SyGem's Avatar
    iPhone Nanite

    6 Posts
    Global Posts
    9 Global Posts


    Or you could take a look at Kobold2D - this comes with the cocos2d-extension, and a whole bunch of other useful bits.

    I used it for the last game I produced, and it saved me a few days by including these bits.

Posting Permissions