How to contribute to our projects
Contributing to these docs
We always welcome contributions to our documentation.
- Fork our docs repo
- en/ is for English contributions, zh/ is for 中文 contributions.
- code blocks must be wrapped in a markdown codeblock. For Markdown help, please see GitHub Flavored Markdown
- Test your changes using
gitbook serve. Please test in a few web browsers.
- Submit a pull request with your changes and we will review and merge it.
Contributing to cocos2d-x
For general questions
You can ask general questions by using:
- Forum (preferred way): http://discuss.cocos2d-x.org/
- Weibo: http://t.sina.com.cn/cocos2dx
- Twitter: http://www.twitter.com/cocos2dx
To report bugs, please use the Issue Tracker
Steps to report a bug:
- Create a new GitHub issue here
- Add all the needed information to reproduce the bug, the information include
- engine version
- steps to reproduce the bug
- some pseudocode
- resources link if needed
If you want to contribute code, please follow these steps:
(If you are new to git and/or GitHub, you should read Pro Git , especially the section on Contributing to a project:Small/Large Public Project )
- Download the latest cocos2d-x develop branch from github:
$ git clone git://github.com/cocos2d/cocos2d-x.git $ cd cocos2d-x $ git checkout v3 $ ./download-deps.py $ git submodule update --init
- Apply your changes in the recently downloaded repository
- Commit your changes in your own repository
- Create a new branch with your patch:
$ git checkout -b my_fix_branch
- Push your new branch to your public repository
- Send a “pull request” to user “cocos2d”
- It must be complete. See the definition below
- It must follow the Releases rules. See the definition below
Only complete patches will be merged
The patch must be complete. By that, we mean:
- For C++ code follow the Cocos2d C++ Coding Style
- For Python code follow the PEP8 guidelines
- Describe what the patch does
- Include test cases if applicable
- Include unit tests if applicable
- Must be tested in all supported platforms. If you don't have access to test your code in all the supported platforms, let us know.
- Must NOT degrade the performance
- Must NOT break existing tests cases
- Must NOT break the Continuous Integration build
- Must NOT break backward compatibility
- Must compile WITHOUT warnings
- New APIs MUST be easy to use, familiar to cocos2d-x users
- Code MUST be easy to extend and maintain
- Must have documentation: C++ APIs must use Doxygen strings, tools must have a README.md file that describe how to use the tool
- Must be efficient (fast / low memory needs)
- It must not duplicate existing code, unless the new code deprecates the old one
- Patches that refactor key components will only be merged in the next major versions.
Help us promote cocos2d-x by using the cocos2d-x logo in your game, or by mentioning cocos2d-x in the credits.
Spreading the word!
You can help us spread the word about Cocos2d-x! We would surely appreciate it!