The Cocos2d-x Programmers Guide

@slackmoehrle i will try my best to improvise the documentation to suit the understanding requirements of a newbie user.

also, wherever possible i will make essential changes and will push the changes.
Let’s make best set of documentation, so even a noob will understand reading it.

Thanks for raising this post.
@pabitrapadhy on pursuit.

Have a good day. :smile:

Hi
I made some minor changes to 2.md (as much as an experiment than anything else)

I edited them locally with Texts for Mac
Then used GitHub for Mac to commit the changes.

I have no idea whether all this worked - please let me know if it did !!

Cheers
max

I was referring to the style of the old wiki for Cocos2dx here, where links are at the bottom, or, more typically for external sites, on their own page.

Good job so far! Really like this guide. Can’t wait for advanced topics and Services!

This is coming along really well.

However, I’m choosing my next project and can’t find any article about free animation tools. I thought graphics and animation was the raison d’être of Cocos2dx?

I’m wondering if I should revert to app building or may even need marmalade or unity if we don’t get a clear guide on producing art with free tools for the Cocos2dx framework.

Are you just working through the Chinese and sanitising the Google Translate output? thanks

I’ll talk with folks about this.

I am working through the Chinese text.

I’ll agree the docs should include guides for users to cover how to create graphics and animations for the games, perhaps a list of various tools along with short intros and links to point the user to the website of that tools user guides.

There are a number of free tools for drawing graphics (GIMP), I’m not aware of many for animation apart from Cocosbuilder’s Animation tool (Windows only I think), and I believe you can use the currently free Spritebuilder ( download and patch here - I haven’t tried it). Much more powerful tools are available like Spine but it isn’t free, $69 but well worth it I think.

@GMTDev yes I know GIMP but I was after animation tools. I know about SpriteSheets and SpriteSheetPacker too, sorry I didn’t make that clear.
@slackmoehrle thank you very much. I can make my own way learning Blender but I’m in a huff with CocosStudio after designing a lovely animation only to find it doesn’t support reskinning those bones, which I asked about here. That just doesn’t fit my work flow, so I’ll go wrestle some more C++ into some kind of fun.

I wonder if Spine does a non-commercial license for an indefinite period? $70 ain’t bad, if it’s for life… The transaction may then prove deleterious to mine or its life :smile:

Didn’t reskining just get added in 3.3 beta (oops No, that is for 3D models) :
http://www.cocos2d-x.org/news/344

Also, I just downloaded 3.3Beta, seems the Spine runtime is still v1.1 in there :frowning:
If you do try Spine, you will need to follow this guide: http://www.gmtdev.com/blog/2014/09/02/getting-started-with-spine-skeletal-animations-with-cocos2d-x-v3/ … the latest Spine runtimes work, with skinning and everything else it delivers.

Really! Cocos Studio doesn’t support reskin?

Hey, I submitted a PR for updates to C++11 usage in Chapter 14. Haven’t heard anything from you guys. Does it look alright?

I see them. I’ll be working on PR’s next week. I’m trying to button up Chapter 2 and the example code for it.

Finally, been waiting for this all my life!!! It’s good our prayers had been heard. Apparently cocos2d-x is an awesome tool but has very poor documentation (when compared to Corona SDK’s docus) Although Im just about to start reading this, Im thankful for this already. Rest assured I will give feedback on this, beginning to end.

Now let me look for that android Leaderboard tutorial. I hope it’s included here.

i’ve pushed some minor changes, for more elaborative description in 4.md

also could you please describe the meaning of the functions… !!

like what does a create() does in Sprite class create, if it’s not creating a texture, then what is it exactly
a blank node… ??

simillarily the other methods, it would make the documentation more clear.

also for example create(sprite, rect), what that Rect for …!!
the api says it’s a subrectange of the sprite but what is the work of the sub rectange…
stuffs like that,
it will really help us…

Hey, I guess somewhere in the APIs or documentation only, I saw that create() create the empty node. And create(sprite, rect), has rect which means what rectangular portion of sprite needs to be shown. But yes, I agree with u that those things should be at one place :slight_smile:

yes, by making these little efforts the documentation will blossom

i agree the developers dont have much time… but it’s gonna help everyone in the long run…

and hail cocos2d-x … ha ha… :smile:

I hope this will be ready soon :slight_smile: Pls don’t forget to add plugin-x!

I’m working on it! For the 3.3 release we will release what we have for this programer guide and add chapters to it as completed.

1 Like

Thank you so much.

Had been looking forward to something that is concurrent with the latest versions.
This will surely open the doors of cocos2dx for beginners.

Kudos on your efforts.

Hi, I went through the docs…

In 6.md, this is what I found…


Ways to transition between Scenes

auto myScene = cocos2d::Scene::create();

// runWithScene - use this for the first Scene only
cocos2d::Director::getInstance()->runWithScene(myScene);

// replaceScene - replace a scene outright
cocos2d::Director::getInstance()->replaceScene(myScene);

// pushScene - suspends the execution of the running scene, pushing it on the stack
// of suspended scenes. Only call this if there is a running scene
cocos2d::Director::getInstance()->pushScene(myScene);

// popScene - This scene will replace the running one. The running scene will be
// deleted. Only call this if there is a running scene
cocos2d::Director::getInstance()->popScene(myScene);

Here is a little confusion:

What is the difference between replace scene and pop scene. It is not much clear.
What I guess, it should mean is,
replace scene is for replacing the running scene with the passed scene.
But popScene() will pop the current scene and if no scenes are there on stack it will terminate the execution.
But popScene(myScene) will pop the current scene and myScene will run.

SO 2 DOUBTS:
What if I difference between popScene(myScene) and replaceWithScene(myScene)