SpriteBuilderX - editor for Cocos2d-X with C++ support

SpriteBuilderX - editor for Cocos2d-X with C++ support

I want to share with you a really cool editor for cocos2d-x.

Probably someone of you have already heard about SpriteBuilder(aka CocosBuilder). It’s an editor initially developed by Viktor Lidholt. Later some companies continued its development and support.
But lets skip all this. I will just say, that final supported version of SpriteBuilder for cocos2d-iphone was abandoned by apportable in 2014.

However it was picked up by https://github.com/newnon and I can say “ported” to cocos2d-x. Because SpriteBuilder development based on cocos2d-iphone. Many things was tweaked and modified to support it. That was a really huge task. Many thanks for that.

And so, what we have today is SpriteBuilderX - editor for Cocos2d-X v3.x

Main window

bool HelloWorld::init() {

    if ( !Node::init() ) {
        return false;



    //custom loader
    cocos2d::spritebuilder::NodeLoaderLibrary *library = NodeLoaderLibrary::getDefault();
    library->registerNodeLoader("CocosLogo", &CocosLogoSpriteLoader::create);

    //simple loader, just examlpe, not been used or created in SBX
    using LevelNodeLoader = SimpleNodeLoader<LevelNode>;
    library->registerNodeLoader("LevelNode", &LevelNodeLoader::create);

    CCBXReader *reader = CCBXReader::createFromFile("HelloWorldScene.ccbi");
    cocos2d::Node * scene = reader->createNode(this, SceneScaleType::MINSCALE);

    _labelHello->setString(StringUtils::format("Hello\nCocos2d-x v%s",_cocosLogoSprite->version.c_str()));

    return true;


Everything is WYSIWYG. You can test your scenes under any resolution you need:

Publish to both platforms iOS & Android with different options:

Supported compression formats:

##How it works with Cocos2d-x v3.x
SpriteBuilderX requires the use of https://github.com/newnon/cocos2d-x (pease use latest branch from it, currently it’s https://github.com/newnon/cocos2d-x/tree/v3.13.1)
This fork includes all up to date modifications from official cocos2d-x repo and also loader for ccbi files created in SpriteBuilderX.

Demo project

Github: https://github.com/KAMIKAZEUA/SpriteBuilderX-Demo

##SpriteBuilderX Github
Repo: https://github.com/newnon/SpriteBuilderX
Issues: https://github.com/newnon/SpriteBuilderX/issues

If you want just quickly run latest SpriteBuilderX.app - download it here however, I probably will not publish releases there… so just use github and Xcode to build for yourself :slight_smile:

Feel free to contribute.


I’ll definitely try it out when I’d have a moment.
Does it support spine models?
Looks very promising, especially because it’s open source. Even if in the future current author will abandon it community still can continue working on it.

Animations in SBX are the same as they was in old SB for cocos2d-iphone. That means you have just:

There are many tutorial about that, for example first I’ve found: https://www.makeschool.com/online-courses/tutorials/getting-started-with-spritebuilder/sprite-animation-spritebuilder
It’s the same for SBX.

1 Like

Wonderful! I’ve downloaded couple of days ago but didn’t try it yet. So it’s working…

I see it outputs ccb files… that means they can be imported into cocos creator and take out a js web working solution?

Sorry, I didn’t know that. Never used it before :slight_smile:
But is it possible to add in the future?

Yea and already many games were developed using it.

I don’t think so and I don’t care about cocos creator, it’s bad as for me. Sorry for straightforward answer. :slight_smile:

Probably, if someone waned to add it - pull request will be merged for sure. I don’t have any ideas about that.

Also, what I’m thinking about is merge with official repo, however it’s will not be easy, because /newnon/cocos2d-x have a lot of modifications to load ccbi files, it’s not just loader code from editor-support folder. But if some of lead developers interested in this… @ricardo @zhangbin @zhangxm @slackmoehrle ?

@anon98020523 thanks for the good work.
Currently, we are making creator as the editor for cocos2d-x. So we don’t have resource to support SpriteBuilderX. It is better if somebody can maintain it.

I will try to make some PR for additional functional to support SpriteBuilderX

1 Like

@zhangxm Thank you, but mostly thanks to @newnon. I just recently joined SpriteBuilderX development.
We supporting this. Loader in cocos2d-x code and SBX development. You don’t need any additional resources for that, but only what we want - it’s merge changes with official repo in future pull request.

looks like very cool, does this editor support old cocosbuilder ccb files?

Don’t know about old CocosBuilder (it’s really old for now, but I think - no), but for SpriteBuilder(project that were created in it) - yes, mostly, when you open old project and ccb files they will be converted to new. You can just test how it goes with your old project.

Sprite Builder was the best editor back when Cocos2d-iPhone was still ahead of Cocos2d-x. I just wished that Cocos2d-x would use this SpriteBuilderX as their main editor and not these various editors that never work nicely or just crash.


Yea, same here :slight_smile: But they’re creating a new editor… and don’t interested in SBX…

I just found it now, and on the weekend i will try it. Thank you!

Sorry for my English,
I think it is excellent that you continue with the development of Spritebuilder, but as always to be consistent you have to train the developers to know how to use the application, a tip for the project to be positive creates tutorials.
I wish you the best with your project and if you need any help name it.

Yea, I’ve thought about that… but currently I don’t have time and I don’t think that I will find any. However, in 1st post there is a link to Demo project, that shows loading process done. Should be enough to understand… however there are some other options that I should add into demo… maybe later.

I’m actually trying to setup this but i don’t understand how to

  1. i’ve created a new project from official cocos2d-x from command line
  2. Downloaded and compiled SpriteBuilder branch 1.3 by my Xcode
  3. downloaded https://github.com/newnon/cocos2d-x but there is no cocos2d-x folder here so i assume that the entire folder must be copied to my xcode project but where exactly?
    On cocos2d folder? or in proj.ios_mac folder?

    Thanks in advance.

This is wrong branch, use latest.

Aha, thats just “cocos” folder. Check Demo project https://github.com/KAMIKAZEUA/SpriteBuilderX-Demo
The main idea that you need to replace all cocos2d source files. Folder names a little bit different “cocos” or “cocos2d”. Well, you need to understand cocos2d-x structure to do any modifications without any problems.

Also, I’m using pre-build libs, so I don’t have any source in my project. It’s really speed ups build times. Check forum how to setup it, if you want.

Also, if you just take a look at https://www.makeschool.com/online-courses/tutorials/getting-started-with-spritebuilder/installing-spritebuilder
Or even just google “spritebuilder tutorial” you will find a lot info.

There will be some differences, but mostly I think all will be the same… in general.

WOOW, this the best editor from all that I have seen! cocoscreator - because of which I closed for myself cocos2dx.

We did really great games with SB which featured by apple… and now i see SBX, great!

This is something worthy of support…

ps unity for 2d games is crap too.