cocos2d for iPhone

A fast, easy to use, free, and community supported 2D game engine

Register or log in - lost password?
  • Blog
  • Store
  • Games
  • Documentation
  • Download
  • About

cocos2d for iPhone » Programming » cocos2d support (graphics engine)
[sticky]

READ BEFORE POSTING

(67 posts) (32 voices)
  • Started 3 years ago by riq
  • Latest reply from abitofcode

Tags:

  • 2D
  • AI
  • apple
  • CCNode
  • coco
  • cocos
  • cocos2D
  • game
  • game posting
  • getting started
  • guideline
  • hello world
  • help
  • help wanted
  • indie
  • ios
  • iphone
  • iPod
  • isabel marant pas cher
  • Isabel Marant sneakeres
  • kamcord
  • messi f50 shoes
  • new
  • pixel
  • pixel art
  • pm
  • retro
  • sneakers isabel marant
  • subclass ccnode
  • welcome
  • XCode
123Next »
  1. riq
    Key Master

    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:

    1. Open the cocos2d xcode project
    2. Click: Xcode → View → Customize toolbar
    3. Then, drag Active Target and Active Executable to your top project tool bar.
    4. 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:
    http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:sample_games

    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:
    http://www.mikeash.com/getting_answers.html

    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.

    Also provide:

    • 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 ?

    .

    Recommendations

    • 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

    .

    Behavior
    Treat people with respect.

    Wiki Documentation
    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.

    Allowed content
    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"]

    Posted 3 years ago #
  2. Codemattic
    Moderator

    Hi Riq, Should we still use pastebin? I figured since we can get formatted code in the forum (if you put it between backtick characters) that we wouldnt need pastebin anymore? It was like pulling teeth to get people to use it anyway.

    Posted 3 years ago #
  3. coolman
    Member

    With the bbCode bbPress plugin there is no need for pastebin.

    Meanwhile it's needed

    Posted 3 years ago #
  4. riq
    Key Master

    Using the backtick to post code is an alternative to pastebin / pastie.org

    Posted 3 years ago #
  5. riq
    Key Master

    Updated welcome.

    Posted 3 years ago #
  6. Clain
    Member

    The post is really long now, I'm afraid nobody will read it. Riq, can you make it sticky in the main forum as well ? (I mean, here : http://www.cocos2d-iphone.org/forum )

    Posted 3 years ago #
  7. riq
    Key Master

    yes, thanks. it was too long. it is still long, but I've removed the "issue tracker" section. I made it "global" sticky.

    Posted 3 years ago #
  8. ob1
    Member

    Nice post.

    I have a minor remark. The post mentions the "monocle studio tutorial" but doesn't say what it is or where to find it. I think it's confusing for new users.

    Posted 3 years ago #
  9. riq
    Key Master

    fixed.

    Posted 3 years ago #
  10. Clain
    Member

    I still don't think a lot of new people read this thread. Maybe renaming it to "READ BEFORE POSTING" would have a little bit more impact.

    At least, to have people post code correctly, you could modify the text below the "Send Post" button. Change it from "You can also put code in between backtick ( ) characters." to something more like an order "Put code in between backtick ( ) characters." And emphasize it : make it bigger, maybe red and right-aligned.

    Just thoughts...

    Posted 3 years ago #
  11. Codemattic
    Moderator

    I wish forum software let you define a message a new member has to read through before they can submit their first forum post.

    Posted 3 years ago #
  12. jer
    Member

    One way, would be to put it in a message when the user signs up. And as for the captcha, make it a question about what is being talked about in paragraph 5, sentence 1, word 9.

    Posted 3 years ago #
  13. abitofcode
    Administrator

    We could always try renaming it to "An apple insiders guide to getting featured on the app store" ;)

    Posted 3 years ago #
  14. riq
    Key Master

    updated subject. updated "backticks" phrase.

    @abitofcode: LOL

    Posted 3 years ago #
  15. Codemattic
    Moderator

    Mike Ash has a pretty good article about how to ask questions in forums so that you are most likely to get good answers:

    http://www.mikeash.com/getting_answers.html

    Posted 3 years ago #
  16. riq
    Key Master

    @codemattic: thanks, I've just added the link to post.

    Posted 3 years ago #
  17. bradparks
    Member

    There's 2 other ways of finding example code that I think alot of people new to XCode might miss, those being:

    • You can easily search all the files in the current project by going to the following dialog in XCode:
      "Edit | Find | Find In Project"

      For example, if you wanted to find examples of how "GetFixtureList()" is used in Box2d, just go to the above dialog, type in "GetFixtureList()", do a search, and there's an example. This of course works great with the default cocos project, or any project based on one of the cocos templates.

    • You can easily search the current development version of Cocos by going here:
      Search all cocos source code in Subversion

      Just type what you want to search for in the search field beside "Search Trunk", and then click "Search Trunk". The bonus for this type of search is that you can copy the link out of the address bar, and put it in forum posts so people can see the code you're referring to!

    Posted 3 years ago #
  18. Codemattic
    Moderator

    Maybe we should add that if you have errors - make sure to post what those errors are, dont just say "I have errors." Open Run->Console to see whats going on for run-time errors.

    Also maybe explain how to do a backtrace.

    Posted 3 years ago #
  19. riq
    Key Master

    @codemattic; yes, good idea.. Could you edit the message ? If you don't have permissions, please, let me know.

    Posted 3 years ago #
  20. Codemattic
    Moderator

    OK - I updated the "How to ask questions" section. Feel free to edit/delete any of it.

    Posted 3 years ago #
  21. riq
    Key Master

    @codemattic: thanks.

    Posted 3 years ago #
  22. rolando
    Moderator

    here's another interesting link for those wanting to ask questions:

    http://whathaveyoutried.com/

    Posted 3 years ago #
  23. kailashgajara
    Member

    thnx

    Posted 3 years ago #
  24. Dakiu
    Member

    i made all the steps

    1.- Open the cocos2d xcode project
    2.- Click: Xcode → View → Customize toolbar
    3.-Then, drag Active Target and Active Executable to your top project tool bar.
    4.- Select the test you want to view in both drop downs and hit Build and Go

    And don't appear the examples :S, only the executable of my project (not even the cocos executable), can you be a little more specific??

    I assume that in the Cocos2d Folder when you added to a project it contains these examples.

    Other thing, maybe should be something good include the explanation of how install the TEMPLAte..

    Posted 3 years ago #
  25. Codemattic
    Moderator

    template instructions should be in the readme that comes with cocos2d!

    Posted 3 years ago #
  26. goldplated
    Member

    @Dakiu - In order to get the test to work you have to open cocos2d-iphone.xcodeproj inside the folder where you downloaded cocos2d (ie. /users/dakiu/Downloads/cocos2d-iphone-0.8.2 ) and you will be able to pull down the test. As long as you have the Active Target and Active Executable on the tool bar you should be good to go. When i first install i had the same issue because it wasn't very clear that I was to open the actual template instead of creating a new project and trying to get the test from the drop down box. Hope this helps.

    Posted 3 years ago #
  27. abitofcode
    Administrator

    I suggest we change this topic to 'Nothing to see here, Do NOT READ' or 'Apple announces Flash player for iPhone' ;)

    Posted 3 years ago #
  28. DaveRC
    Member

    @abitofcode pointed me here from the "Cookbook Thread" so I obviously didn't read this first. I apologize for that - my own stupid mistake.

    Comment on using the tests as documentation. Now that I see how to run them easier and can play with them, they are great. However, I would definitely add in some comments and "play by play" if you are going to point people to them as documentation. But thanks for the tests... I really appreciate them now that I know they are there. :)

    Posted 3 years ago #
  29. abitofcode
    Administrator

    Just spent a pretty frustrating 15 minutes trying to find a post on the forum that I knew existed! When posting please carefully consider the title and tags.

    For instance the following post titled;

    How to know if the app its running on iphone or itouch?
    http://www.cocos2d-iphone.org/forum/topic/3638#post-21994

    Has the tags;

    * auto
    * device
    * orientation
    * rotation

    Where;

    * platform
    * os
    * device
    * model
    * iPhone
    * iPod

    Would probably make more sense. I'm not picking on this post in particular, it has a title that makes sense and isn't 'How do I write a game'.

    Posted 3 years ago #
  30. sagar
    Member

    Hi!

    I have some issue in SoundEngineManager.
    In my game when receiving a call, and we reject our call and returning to the game, any music and sound effect won't play.In applicationWillResignActive function i stop/pause sounds. and after that in applicationWillBecomeActive function we play sound.
    but it is not working.

    Plz help!

    Posted 3 years ago #

RSS feed for this topic

123Next »

Reply »

You must log in to post.

cocos2d for iPhone is proudly powered by bbPress.