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

That’s a new modification, so probably new project not supported with it. Just 0, 0.

1 Like

Ok, now it works :slight_smile:

We did “some” tests and found issue in latest git of SBX.

  1. First of all we did new project in SBX.
  2. When we add ccb node to the SCENE we get bug with textures coordinates:
  • as i found - only in Landscape mode

Ok, then we downloaded your SpriteBuilderX-Demo-master and found that your old SpriteBuilderXDemo.spritebuilder projects works without this bug.

All new projects created through SBX are bugged.

Appdelegate is different and we don’t use resolution policy. This project not official so you should think your own and compare with demos if something not works.

However, it’s not open bug product. I’m developing game using it and all is perfect and stable.

Please help to understand how to get the animation manager of a node which is loaded from the SpriteBuilder? I need it to run another timeline of a node. A node itself does not have a property like AnimationManager. I tried to get it by creating an heir from NodeLoader. But I also could not managed to get it this way.

The second question: how to get an access of callbacks in the code which are indicated in timelines of SpriteBuilder?

photo_2017-11-07_16-33-42

I personally never used animations in SBX. But it’s fully supported and works. Here is some code snippet.

cocos2d::spritebuilder::CCBAnimationManager* anim = cocos2d::spritebuilder::CCBAnimationManager::fromNode(rootNode);
        if (anim)
        {
            anim->stopAnimations(true);
            anim->runAnimationsForSequenceNamed"Default Timeline");
        }

Also, any tutorial about old Spritebuilder is almost fit to new SBX. There are many information and tutorials, just google: “spritebuilder makeschool” and\or “spritebuilder tutorial”.

1 Like

Can I still use SpriteBuilderX for building Win32 applications? Windows is the most popular desktop gaming OS.

SBX is not app for building applications. It’s level editor(scene) and resources packer.
It’s whatever platform you targeting, just select proper resource type, supported by that platform and publish. But you can run SBX under macOS only. Thats it.

SpriteBuilderX is a great project. It’s actually what most of C++ developers want from CocosCreator (and will newer get). The only thing that makes me stay away from it - different cocos branch. This branch obviously differs from original version and it is risky to switch to it for many developers because it’s future is undefined for now.
newton does a great job by fixing a lot of bugs of original cocos. But why doesn’t he merge his fixes to original cocos?
Here is an example of such fix newton made in his branch. But original cocos branch still has these issues.

2 Likes

Yea and too bad that creator developers have no idea what they are doing… as I believe.

It’s because loader code also requires changes of engine code, which is hard to merge or don’t even wanted to be merged…

Yea, thats why I choose(like) to use it instead of just official version. It includes all fixes from original + additional fixes.

As I see, it’s because when he pushed update(some time before he actually created some pull requests time to time) and tried to spent time with it by describing what and why it’s needed - actual result is bureaucracy, and pull was just ignored or like put on backlog or need to be tested and so on… Or even worse - pull closed(ignored) without merge, with some reason. So he probably just don’t want to waste time now, too much other work needs to be done.

I’m developing my game using this branch for about 9 months and never faced some crash or even problem with it, it’s very stable as for me.

What about future… it’s used in production games, so it’s all alive and supported… I hope for a long time.
Actually, when I’m look at cocos creator - I’m sure that it will fail like cocos studio. So what happened next… maybe official cocos2d-x will not be supported then. Or even maybe Swift will be used by google on android and so C++ and js, lua will be like abandoned and not needed. New cross-platform engines will arrive based on just Swift. I don’t know…(Swift code will run on Google’s Fuchsia OS)

1 Like

Hi! Greetings from Argentina. I downloaded and tried to use SpriteBuilderX and works perfect, but i cannot run any edited level maked using it.
I followed the instructions from https://github.com/KAMIKAZEUA/SpriteBuilderX-Demo
First clone the repo recursively (git clone --recursive https://github.com/KAMIKAZEUA/SpriteBuilderX-Demo). Then run SpriteBuilderX-Demo/cocos2d/download-deps.py
Open SpriteBuilderX-Demo/SpriteBuilderXDemo.spritebuilder and publish.
When i try to build SpriteBuilderXDemo.xcodeproj, first CCFileUtils and CCFileUtils-apple fail because system funtion its not allowed anymore (Call to unavailable function ‘system’: not available on iOS), so i replaced CCFileUtils with the last version found in Cocos2dx 3.16.
Then, i can build but when i try to run in simulator cannot load the file because of the version number 9 ("WARNING! Incompatible ccbx file version) and the app fail because null pointers.
If i comment the version validation i get this console message: “no corresponding node loader for position” and the app fail again.
Sorry if my english isn’t the best. Any help would be appreciated.
Thanks

Just use latest commit for cocos2d-x newnon.
That demo was created a long time ago, but editor updates very often, so after some time you should use latest commit and always.
Also, don’t replace anything it will not work.
Also2, what versions you see in About of SBX?

Thanks for your fast answer!
I erased all and started again, but this time, replaced cocos2d with the latest commit as you say.
Now, when i try to build, i get this error: ‘createNodeInstance’ marked ‘override’ but does not override any member functions. If i remove the override, i get: “variable not assigned for name:cocosLogoSprite”
The version of SBX is: SB Version: 1.5.31 SB Revision: 3835

Ah, I forgot about this. Just search createNodeInstance and you will find that there are new parameter added:

virtual Node *createNodeInstance(const Size &parentSize, float mainScale, float additionalScale, CCBXReaderOwner *owner, Node *rootNode, CCBXReaderOwner *rootOwner, const cocos2d::ValueMap &customProperties) const override

Also, updated demo project on git.

Everything works perfect now! Thank you so much for your time

Hi KAMIKAZE,

First of all, thanks for introducing SpritebuilderX to the cocos2d-x community and also huge thanks to newnon for all of his hard work so we’re able to use the best level/ui editor once again - cross platform too!

I have really good memories w/ Spritebuilder and I was really sad after the Apportable issue and it’s really awesome I found this thread. Anyway, I’m currently trying to make everything work but I’m having some issues. Here are the steps I’ve already done so far (I’ll make it very detailed to help others as well) :

  1. Clone the newnon cocos2d-x repository (branch v3.16)
  2. Run download-deps and run setup scripts
  3. Run “git submodule update --init --recursive” to be able to use cocos command line bin
  4. Created a new project using the command line named MyGame
  5. Replace MyGame/cocos2d/cocos with the newnon cocos2dx/cocos folder
  6. Build & run the project on mac to test everything is ok.

… Now here’s where I get confused / lost.

  1. Clone SpriteBuilderX
  2. Run “git submodule update --init --recursive”
  3. Create a New Project in SpriteBuilderX
  4. Go to MyGame folder and save MyGame.spritebuilder there
  5. Added some new sprites in the SpritebuilderX interface (lower left area)
  6. File>Publish in SpritebuilderX

Then when I go back to project folder the sprites I’ve added is not in the resources folder. I thought that I should drag them into the project but I noticed that in the SpriteBuilderX-Demo, it’s automatically added into the project files when I publish. I’m wondering how that was set up.

Any ideas on what I’m doing wrong here? Help from anyone who got it working perfectly would be very much appreciated.

No, it’s in Published folder. Which added into you Xcode project as folder, so blue colored, so Xcode will monitor that folder and use all files inside it each time you republish anything in SBX.

You like should learn from demo project provided and try to match a newly created. ALso, you probably just can use demo and rename it… and use for your game.

Finally got it working!

Yes, I was actually trying to learn from the demo but I wrongly assumed that the resource folder linking was automatic like the old Spritebuilder. Looks like I just had to drag the resource folder manually and link by reference at least once before it works correctly.

Next step is getting my own ccbs loaded and that should be really easy now. Thanks again!

SBX v1.6.3 (check first post for more info of how to use it ).

GitHub - newnon/SpriteBuilderX
GitHub - newnon/cocos2d-x at v3.16 (you should always use latest commit from this repo for latest SBX).

  • prefabs - any “.ccb” file can be set as prefab object and can be drag&drop’ed on the scene. Menu View->Show Prefab Options used to show parameters, which prefab will use from object.
  • custom properties - a lot of improvements: sorting, multi select, drag and reorder, separator as list item, default value parameter, BOOL value now showed as checkbox,
  • scene zoom - use Command + mouse wheel to zoom the scene and Command + mouse click to drag the scene. Also, zoom for each design resolution will be saved(when you save .ccb)
  • publishing - fixed errors with High Sierra, cause re-publishing for same files.
  • and a lot minor bug fixes and improvements

I’m using SBX for my game in development. It’s super stable and useful app as for me. I’m developing all UI and levels in it.


Screen%20Shot%203

3 Likes

Hi,

I created a new project and copied ‘cocos2d’ folder from spritebuilder demo project and replaced it. But getting error ‘Variable type ‘AppDelegate’ is an abstract class’ from AppController.mm.

Can anyone help me to understand the problem?

Thanks,

We don’t support SpriteBuilder on these forums, it is a 3rd party project. Perhaps create an issue on their GitHub repo.