Cocos2d-x documentation, why?

Why is cocos2d-x documentation SO poor OR non-existent on the cocos2d-x.org website, especially after all this time? Why isn’t there example code on the site for every module or class? With the popularity of Cocos2D in general, it’s a bit shocking that the docs are in such a cluster-fuck of incompleteness or disrepair. I mean, it’s like we have this awesome game framework that 1/4 of all programmers use to make games for iOS (for example) and the documentation is like totally (yes, for the most part, totally) missing. How does that happen?

1 Like

My guess is because it’s a completely free project, so maybe nobody gets paid to document the code so people rarely do? I mean, who wants to document code - especially without getting paid - when you could be programming?

That said, I’ve wanted to make a documentation/tutorial site for a while now, but time is hard to find.

Lame answer, BUT I welcome your tutorial site should you create one. Being free isn’t an excuse for poor documentation. Many open source projects sport excellent documentation and examples, see the Cocos2d-swift website as an example. The creators, contributors and experts should be submitting and updating the docs, should be a priority. I would gladly help IF I knew cocos2dx well enough, ironically, I don’t, because of poor documentation and examples – a vicious circle.

Suggestion - anyone touching code should ensure that there is adequate xml documentation for that method they are touching. In a short while, everything will be documented an it won’t be toooo boring to do.

while they lack the documentation, they have excellent cpp-tests project that explains most of APIs and how to use it. For all the motion that you need you can search through and see if you can find one that suitable for you.

I think this topic is already discussed several times…
So search is on forums if you want more answers…
And further yes cocos2d-x is one of the very good frameworks and there are too many reasons why you should be going with cocos2d-x/JS.

So, instead of keep sticking to this issue move and ask your questions/doubts and I am sure majority of your doubts will be resolved :smiley:

While I understand you are frustrated, it isn’t fair to blame your lack of knowledge about cocos2d-x on the fact we don’t have as much beginner documentation as others. There is no vicious circle. There are a lot of developers that manage to become great with cocos2d-x and release several games. They might try harder.

We definitely require new users to have some knowledge of coding, coding practices, etc. We just can’t teach everything. We don’t have this all in one tool yet like Unity. But we are working on it. Visit http://cocos.com

Also, we are working on a Programmers Guide that can be found in WIP: http://cocos2d-x.org/programmersguide
Only chapters that are finished are put here. You can always read the development at: https://github.com/chukong/programmers-guide/

There are 2 kinds of developers, I think. The ones that are ok using an API reference that is generated by source code comments. Then the ones that need a more structured “book” style for learning. We are trying to accommodate everyone. This takes time and we are making progress.

If you feel specific examples are useful in the API docs, send me samples and I’ll review and add what makes sense. I don’t need anything more than a concise, to the point, few lines of code that demonstrate something specific.

It’s stupid to say [quote=“grimfate, post:2, topic:18507”]
who wants to document code - especially without getting paid - when you could be programming
[/quote]
That’s so stupid. If you do not document your code then nobody will know how to use it properly so you end up with your time wasted.

I don’t think his comment is stupid. It’s frighteningly realistic. Programmers just don’t like to say it out loud.

There are a lot of programmers that would rather be writing code. They might have good intentions to document but they get side-tracked or have a new idea and they say they will go back later and they just don’t. We have all done this.

Without the code, nothing exists. Without documentation the code still exists just might not be as understandable to others. Chicken and egg paradox if we think about it.

I’ve been diving into the example code, but reverse engineering code isn’t ideal and certainly no substitute for good documentation.

While the documentation is slightly better for the JS side, it remains very poor and fragmented for the C++ side. “Moving” to JS as you suggest is another lame answer.

This is the lamest answer of all.

I totally agree @grimfate. Some of these people are complete clowns with their stupid replies.

@slackmoehrle You shouldn’t be answering questions, you’re embarrassing yourself.

This topic is now invisible. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.

You can e-mail me at: jason@us.chukong-inc.com to discuss this.