The Cocos2d-x Programmers Guide

We have talked about this and are coming up with ideas to make this seamless.

I did refered to the programmer’s guide at times.
Recently, I was into multi player game programming with cocos2d-x.

The parts of the programmer’s guide seems to give beginner’s level knowledge at good level.
Yet I feel that it would have been good if we have some advanced topics in it.
If some basic example would have been there that shows multi player programming then it would have been good because I am not finding anywhere to implement it with cocos2d-x.

So, I wanted to ask the author which advanced topics will be covered in the guide,
and simultaneously I would like to request to cover advanced topics showing other APIs of cocos2d-x
once the basic things of the guide are completed.
By advanced things I meant like, I saw that API reference has more Actions then what are just mentioned like: cardinal, Progress to, Follow and many others. So, after what author is intended to finish, is there a possibility that you’ll cover these things also. I mean, if moveBy is covered then no need to cover JumpBy because they’re highly similar but please cover what are not similar.
Similarly, there are other APIs which are not covered.

Hope you’ve planned something for future enhancement to make it to advanced level.

Thank You.

Still no word on my PR. This is regarding C++11 usage.

We have, take a look here: https://github.com/chukong/programmers-guide/blob/master/outline.md

If you have ideas for topics, create a GitHub issue so I can have what you want in a central location.

I’ll be adding these after I complete the final draft for Chapter 12 (next week)

Very fun! Thank you very much!!
In Chapter 3, Could you give a bit more detail about how loading a SpriteSheet works?

// this is equivalent to the previous example,
// but it is created by retrieving the spriteframe from the cache.
auto newspriteFrame = SpriteFrameCache::getInstance()->getSpriteFrameByName("mysprite.png");
auto newSprite = Sprite::createWithSpriteFrame(newspriteFrame);

I’m assuming that there’s some sort of function that would allow you to “crop” or “select” an area for a frame?
Could you show us how to grab multiple frames?

I’ve found an example on an old post here, but I’m not sure if this is how it generally works.

When you load a sprite sheet it has 2 files. One that contains the images and a second, a .plist, that contains info that describes the Sprite and its size in a Rect. The engine interprets this and when you ask for mySprite.png it knows what to return, its size, etc. You can look at the .plist in any text editor or Xcode.

OK.
I will as soon as I get a chance. Thank you.

Please include a section for the log method in the new Programmer’s Guide. The replacement for the deprecated CCLOG and CCLog is log. This follows the pattern of stripping away the CC prefix in the migration to 3.x, but all of the old documentation and tutorials I’ve encountered use either of the 2 older methods.

Note: the migration guide includes a command to reinstate CCLOG after the CC prefix has been removed by an earlier command: http://www.cocos2d-x.org/wiki/User_Tutorial-CPP_Migration_from_v2_2_*_to_v3_0

CCLog is still referenced in the new docs once (2 other examples use the appropriate current log method): http://slackmoehrle.github.io/H/

Thanks for mentioning this.

Chapter 9, 3D, is alive!

http://www.cocos2d-x.org/programmersguide/9/

2 Likes

A couple of weeks ago we released an API guide for Cocos2d-x and Cocos2d-JS completely free covering many features from every action with video examples to 3D.

Yes and your guide is all of the content we are adding to the Programmers Guide, some language changed. You literally have taken my work and changed the graphics and some wording.

This is confusing to the users to have documentation in multiple places. I feel like the defeats the purpose of a united community.

I like the some of the graphics you have used to explain concepts (specifically the 3D chapter). Perhaps a better way to approach this is if we incorporate the graphics you have (provided there is permission from the source to use them) into the guide via pull requests.

1 Like

Well it’s not the same. I won’t lie that I took inspiration from your guide, I did but it’s code that is a few lines so will have huge similarities. Besides we started a while back when yours was in it’s early stages. Regarding a unified community we made this for the same reasons we made our videos because it was long over due. Considering ours is finished and yours still have many chapters left theres no way we copied the entire thing at the very least. The main thing we took from yours as I don’t wanna lie is the sections and the order apart from that it was more us.

Not trying to start a pissing match here just stating the facts.

Regarding working together on this. You have our email so feel free to contact us.

We started this guide in August. The first post in this topic was September 14. Your “version” has come out after we started releasing chapters officially, in 90% the same format, same wording, etc. For the code you replaced our use of auto. The 3D chapter is so similar it isn’t “inspiration” its plain outright copying.

The fact of the matter is we do things in an open-sourced venue. We give away our work for the benefit of everyone that wants to use it. If our Programmers Guide helps you build a learning site that you think you need to help users then so be it. Perhaps some users will fond your site easier for them to learn. I can’t stop that. I don’t have to be happy about it though. If anything it just motivates me more to continue the work that is going into our version. If you have pull requests you would like to submit then you are welcome to do so. They are always welcome and appreciated.

1 Like

Well there is very little documentation so we have to learn how to use it from somewhere and then create resources.

We created it because Chukong doesn’t have the best resources so we did videos then this.

I don’t see a problem. Your more than welcome to take stuff from ours.

We know the documentation is lacking, that is why we are creating the Programmers Guide, why we upgraded the forums, why we have developers writing code and also submitting documentation for the Programmers Guide at the same time.

Your videos have been around for a long time and we appreciate those. I have watched a number of them. I find them useful and informative. Kudos. You contributed these and there was a clear gap and need. Our users references your videos a lot. This was a great void to fill.

But you can’t say there is very little documentation so you have to learn and create it when you copied what I was already working on and are trying to pass it off as superior to our official guide. This is what doesn’t make sense to me.

1 Like

Videos are fine, but static. Why not make some interactive programming guide?

It would be more awesome to have an interactive code terminal, where you can try out the original code and even modify it. This way you see direct outcomes of the changes.
The tricky part would be to build some C++ parser that drives the JS/html5 version of the engine.

@slackmoehrle Regarding your “copying” claims, just take it this way: they forked your programming guide :wink:

1 Like

We are not saying it is superior just another guide. Developers can use what they want. If you want we can put a reference to your guide in it.

An interactive editor is something we want to add to Sonarlearning.co.uk eventually. It’s in the pipelines.