Welcome to the cocos2D forum, in order to make your visit pleasant and productive please read through the following.
We love to answer your questions, but there are some things you can do
to improve the response time and completeness:
Before you make your post
Is there any example code?
cocos2d comes with a set of demo's (you may have cut these away if you followed the Monocle studios tutorial). Look through the example code included in the cocos2d distribution you are working in, the sample code is updated along with the distribution so what may have worked in version 0.7 may not be relevant for version 0.8.1.
The following tip from the Wiki may help you get up and running with the examples:
- Open the cocos2d xcode project
- Click: Xcode → View → Customize toolbar
- Then, drag Active Target and Active Executable to your top project tool bar.
- Select the test you want to view in both drop downs and hit Build and Go
There are also a number of open source games out there complete with source code available for study:
How do I start writing a game in cocos2D?
Try iPhone Games Projects (Apress) there is a bonus chapter by Jamie Gotch available from the website along with the source code. This chapter covers building a blocks game in cocos2d.
I'm having a bit of a problem with Objective C?
This is not an Objective C forum, though it can be hard some times to differentiate between which bits are part of which Framework. Try the following books/pdf:
- Learning Objective-C: A Primer (online)
- Introduction to The Objective-C 2.0 Programming Language (pdf)
- Learn objective C on the mac - Mark Dalrymple & Scott Knaster (Book)
I'm having problems with cocos2D 'methodXYZ'
Have you looked at the cocos2D API documentation ? This article shows how to integrate the cocos2d API documentation alongside the Xcode documentation: http://www.cocos2d-iphone.org/archives/358
Is there a programming guide / best practices ?
- Programming Guide: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:index
- Best Practices: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:best_practices
How do I get one of those funky icons?
Head over to http://gravatar.com and set yourself up with an account. Gravatar uses your email to identify you and display the appropriate avatar.
How to ask questions?
If you want to get a good answer (or an answer at all), please read this post:
Make sure your question has enough information in it that other developers have a chance at answering it. Did you crash? OK, where? What was the program doing at the time? Post the backtrace (type bt in the console). Did you get errors? What were they?
Whenever possible show the smallest full code example that demonstrates the bug. When developers post tiny snippets where they think the bug is, often it is in a completely different part of the sourcecode.
Was this problem on the Simulator or on a device? If its on a device, then what device? Running which version of iPhoneOS? Using which version of cocos2d-iPhone?
If you post a question that is too vague it will probably take a long time to figure out. Or other forum members may just ignore it.
Things you wish you knew when you first started with cocos2d
A particularly interesting thread pointing to a number of resources and Gotcha's http://www.cocos2d-iphone.org/forum/topic/737#post-4405
Searching the forum and tags
Search the forum to see if anyone has posted a similar issue. Tags are you friend too!
When you post remember to tag your post. If you are asking something regarding Sprite, add the "Sprite" tag, if you are asking something related to LabelAtlas, add the "LabelAtlas" tag, etc.
Tags are very helpful to classify information.
Reporting a bug
Report bugs/enhancements on the Issue Tracker. If you are not sure whether your issue is a bug or not, you can discuss your issue on the forum. But the forum is NOT the official place to report bugs. Use the Issue tracker instead.
To do so, please include information on the expected behavior and what you are seeing
instead, stack traces are always great, and so is the code that produces them.
It can also be helpful to see if you can find the minimal amount of code that
reproduces the issue, so we can pinpoint the issue faster.
- cocos2d version that you are using
- iPhoneSDK version that your are using
- Debug or Release ?
- Happens on the device ? Which device: iphone, iphone 3g, etc? Simulator ? or both ?
- don't cross-post your question. Post it in only 1 thread.
- the cocos forum is divided into several subforums, be sure to select the appropriate one when creating a new thread
- don't bump your thread after 4 or 5 hours. Wait at least 48 hours
- use the EDIT button to edit your post (available for a few hours) instead of posting after yourself
- use the allowed HTML markup to improve your post. This forum DOESN'T support BBCode
- Put code in between backtick ( ` ) characters
Treat people with respect.
You can edit the wiki. You don't need an permission to do so.
If fact, if you find inaccurate or incomplete documentation on the wiki, you are encouraged to update it!
Wiki documentation: http://www.cocos2d-iphone.org/documentation
Just don't add spam.
You are allowed to post almost any kind of content. Just post it in the right forum.
What you are not allowed to do is to: promote piracy, spam the forum.
[edited: updated welcome]
[edited: updated "reporting a bug" section]
[edited: added link to "Getting Answers"]
[edited: Codemattic added some things to "How to ask questions" section]
[edited: Added "Allowed content"]