C++ support for Cocos Creator

C++ support for Cocos Creator
0.0 0

#172

H! im a bit cofused now.
I got cocos2d 3.14.1, and created a test project
I just updated CocosCreator (1.4.2) and created a test scene,
I wan to try if I can load the scene into the project
If I follow the links mentioned on the discussion, and I found out these 3 links:

  1. https://github.com/cocos2d/creator_to_cocos2dx_cpp
  2. https://github.com/ricardoquesada/creator_to_cocos2d
  3. https://github.com/ricardoquesada/cocos2d-x/tree/creator_reader

I follow the instructions and some have broken links to other files and I get stuckd,
I get the missing files from the other links, and when I try the first step (convert_fire_to_json) the script fails already.

Which link to follow? Are he steps still valid? Can any1 update the links in the site? what am I doing wrong?
tnx


#173

@yaaashua you should try creator plugin as i mentioned above. It will do all the things. And i will create a new thread to release alpha version in days.

@Althurzard thanks for report.


#174

@all i release the alpha0 version in the ticket. Please continue discussion there.
Thanks.


#175

@zhangxm Tnx, I tried the plugin, finally. :slight_smile: I found a weird issue: :frowning:

  1. I created a scene, exported and loaded correctly, but after … I made a modification in Creator, several modifications, but the exported scene (*.creator ) remained unchanged, like the first time I exported it. I even restarted the application. The scene in CocosCreator displays all the changes, but the exported data remains like the first save, IDK why.

Then I created another simple scene (same project) with just a btn and a label, but… the new scene was not even exported. Again, everything that was exported is with “old” data…

VS2017, CC2DX 3.14.1, CCreator 1.4.2
I actually used the same example project from “creator_to_cocos2dx_cpp”
If I try export the data using Project> LuaCpp Support > Build Now : I get a log error (attached as .h)
But If I use Project> LuaCpp Support > Setup Target Project >Build : then I dont have any log error.

I know I sound very bitchy XD but I really appreciate the hard work you all are doing, and I love this tool you are making, I hope this can help you
export error.h (1.1 KB)

update: LOL, I even deleted the scenes and still appear in the exported data hahaha. Ill try the alpha0 now


#176

I found out how to reproduce this error:

-I just took everything from the example project (alpha0) and put it inside a folder “example”
-I created a new scene. As long as this scene does NOT use any of the contents of the “example” folder, everything is fine, but as soon as I place one sprite into the new scene… build script fails , and data is not exported. (error.h (1.8 KB))


#177

It is fixed.

Did you use the plugin to build again?

What did you mean? You tried another version?

And please continue discussion here. Thanks.


#178

how can i use .ccreator file in cocos2dx project when export from cocos creator :frowning: i’m begining learn cocos2dx


#179

Our docs discuss this.

http://cocos2d-x.org/docs/cocos2d-x/en/editors_and_tools/creator_to_cocos2dx.html


#180

image
i don’t know where to add this .can you help me do this


#181

every build system have its own method, such as Xcode

http://docs.bluedotinnovation.com/display/DEVDOC10/iOS+-+Setting+the+Header+Search+Path


#182

What OS you are using? I am having trouble adding header with visual studio’15 running in Win10.


#183

In VS2013, you either literally add the header to your source files, as if it’s one of your own, or you go Project Properties > C/C++ > General > Additional Include Dirs and add the directly-containing folder there.

So, I put the entire reader/ folder into my Classes/ folder, and added ../Classes/reader/ to the include dirs, so I didn’t need to change the include paths in the plugin.


#184

Has there been any discussion I can read about converting a Label from Creator into a ui::Text, like it was in Studio?

Having everything be exported as a widget was nice because you got stuff like easy touch handling and it played well with relative positioning and all that.

Maybe this is a better question for all of cocos2d-x though!


#185

Hi!
Why you don’t support python as a scripting language?
Make ComponentPY like ComponentJS and ComponentLua! :smiley:
And please add them to the creator as soon as you can…
Also there is another question…
You support lua scripting in cocos2d-x but in creator we only can add js, cs and ts script files! Why???


#186

Why would you want that?


#187

This will not happen. It is not even on our list of things to do. Also, Cocos2d was originally python based.

Currently Creator is javascript based. You can also use Creator as a GUI tool and export to C++.