Zhe Wang FAQ & FORUM RULES. Please read before posting
Posts 1642
Location Amoy, China
Added by Zhe Wang over 2 years ago

Welcome! Welcome to cocos2d-x forum! Here're some best practice for you to have a happy engagement with us.

How can I set my avartar/portrait on forum

The same as github.com accounts, your avartar here is linked to your Gravatar.com settings. You can link your registered email and your portrait on Gravatar.com, then it will be shown on both github.com and this forum.

Where can I find documents

  • All titles of wiki pages are listed HERE, please check that you can not find the corresponding content before you ask.
  • Developers Manual, I know you need it
  • HowTos involves some FAQ in the forum

Where can I find API References

  • Online API Reference is here
  • You can find document/doxygen.config (v2.0.2 and higher), or doxygen/doxygen.cocos2d-x (v2.0.1 and lower) in cocos2d-x zipballs. Use doxygen to open this config file, run and generate your offline API Reference.

How to ask for help

  • Always use English.
  • Search for your question on the forums first. It's likely someone may have already answered your question, and you won't have to waste time waiting for it to be answered again. In addition, moderators may delete questions that have already been asked in order to keep the "noise" down on the forums.
  • Always describe the the following infos for your question
    • Platform, e.g. iOS, Android, Windows.
    • SDK version. e.g. Android 4.1)
    • Target device, e.g. Samsung i9100
    • Version of cocos2d-x you using
  • Pasting source code or a sample project to reproduce your question/bug will apparently make the life easier
  • Use marks to high light your source code and make it more readable: <pre><code class="cpp">int yourcode = 10</code></pre>
  • Be friendly. Don't post questions that appear to have a demanding or urgent tone to the words. Remember, your emergency or frustration isn't likely to be shared by others.

How to report bugs?

  • We try to avoid "issues exploding" just like android community. To work effectively, the permission of creating issues is not open to everyone, but only for core developers & active contributors. So there're 2 ways to report a bug:
  • (1) report bugs here, in this forum, if we check it's really a bug, not a tech support or error usage / error installation, we will create issue for your report and trace it.
  • (2) pull your bug fixes directly on github, send your pull request to github.com/cocos2d/cocos2d-x.git

How can I contribute to the community?

  • Feel free to write tutorials in the wiki or in your blog (but please then link them via the wiki). Specific instructions on using the wiki can be found here

Thanks to all contributors!

Enjoy Coding, Enjoy Life.

sleepers tang RE: FAQ
Posts 4
Added by sleepers tang 11 months ago

Good for you!

KS Lam RE: FAQ
Posts 15
Added by KS Lam 11 months ago

OpenFeint integration (by Diego Abad) can't be access.

C Zhang RE: FAQ HttpClient bug
Posts 57
Added by C Zhang 9 months ago

I found a bug in HttpClient.cpp method writeData(void ptr, size_t size, size_t nmemb, void *stream),
recvBuffer->clear();
recvBuffer->assign((char
)ptr, (char*)ptr + sizes);
the code above will lost data

below :
i fix it by using recvBuffer->insert(recvBuffer->end(), (char*)ptr, (char*)ptr + sizes); to replace recvBuffer->clear();
recvBuffer->assign((char*)ptr, (char*)ptr + sizes);

maybe it is a bug in 2.0.2

Zhe Wang RE: FAQ
Posts 1642
Location Amoy, China
Added by Zhe Wang 9 months ago

Hi C Zhang, do you mean that, HTTP operations will call writeData more than once with a single curl_easy_perform() ?

Enjoy Coding, Enjoy Life.

C Zhang RE: FAQ
Posts 57
Added by C Zhang 9 months ago

Walzer Wang wrote:

Hi C Zhang, do you mean that, HTTP operations will call writeData more than once with a single curl_easy_perform() ?

yeap,almost, should we consider it?

Zhe Wang RE: FAQ
Posts 1642
Location Amoy, China
Added by Zhe Wang 8 months ago

Hi zhang, I've fixed this bug, it will be release with v2.0.3

Enjoy Coding, Enjoy Life.

C Zhang RE: FAQ
Posts 57
Added by C Zhang 8 months ago

Walzer Wang wrote:

Hi zhang, I've fixed this bug, it will be release with v2.0.3

YES, I found it in github , thank you:D
C Zhang RE: FAQ
Posts 57
Added by C Zhang 7 months ago

hi, I found a bug (maybe) when I using HttpClient in muilti threading environment, my origin using like this:

for(int i = 0 ; i < 10; i++){
   ZCHttpClient::getInstance()->send(request);
}

it will excute configureCURL() in CCHttpClient 10 times, and it will call curl_easy_init() 10 times too, every times you call curl_easy_init() , the libcurl will call curl_global_init(long flags) first , so at this time , it maybe cause there are two threads calling curl_easy_init() , and they also call curl_global_init at one time ,but curl_global_init method is not thread safe ,so it will crash the process...
second, libcurl using alarm to decide timeout, so in muilti threading environment ,it maybe cause a alarm signal , but unlucky , this will cause crashing.

so ,I solve these problem by adding curl_global_init before curl_easy_init to fix problem 1, and add curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L); in configureCURL().

LI LONG RE: FAQ & FORUM RULES. Please read before posting
Posts 38
Location china
Added by LI LONG 4 months ago

alway use English?

long long ago, I want to be a game designer, however, I may love code more now..

Zhe Wang RE: FAQ & FORUM RULES. Please read before posting
Posts 1642
Location Amoy, China
Added by Zhe Wang 4 months ago

LI LONG wrote:

alway use English?

Yeah, otherwise we will see Russian, Spanish, Korean, Japanese, Chinese all kinds of languages in this forum. That's what I want to avoid.

Enjoy Coding, Enjoy Life.

LI LONG RE: FAQ & FORUM RULES. Please read before posting
Posts 38
Location china
Added by LI LONG 4 months ago

Zhe Wang wrote:

LI LONG wrote:

alway use English?

Yeah, otherwise we will see Russian, Spanish, Korean, Japanese, Chinese all kinds of languages in this forum. That's what I want to avoid.

so does it~cheers for cocos2d-x~;)

long long ago, I want to be a game designer, however, I may love code more now..


(1-11/11)