Implement login and signup feature

I need to implement login and signup feature in my game, can you share how to do it, as i din’t find any tutorial to do so…

I also need to connect to server to send and receive login details and user information…

Some code snippet or tutorial would be helpful…

You can use web services to do this in server (ex: PHP MySQL).
In the client, learn how to use HTTP Network to request to your server with specific URL.
The Wiki here: http://www.cocos2d-x.org/wiki/How_to_use_CCHttpClient
You can response to the client with JSON Data, then use rapidjson to parse it in to Array object and do anything you want.

Just note that rapidjson is actually a part of cososd-x, so you can

   #include json/document.h

Otherwise, as there is no truly boilerplate solution you will have to think about what your use case is. In your case parse the HTTP response but you also probably want to make sure that identical HTTP requests are not sent multiple times.

Thanks guys, will work on it and let you know…

I thought there might be some tutorial on login/signup as there is always for any programming language, so people don’t have to spend time on building same basic stuff, but i didn’t find any…but cocos community is amazing…

Yah, there is no tutorial for such thing, but you can do what @ajenkul suggested. One more suggestion is you can also try using the REST APIs for ParseSDK. The login and signup feature is fairly simple to use and the output can be easily interpreted. You do not need to implement your own web service for this kind of things.

The only thing about using HttpRequest and HttpClient is that you need to format the headers and request body yourself. For Parse SDK, the body is just a JSON. However if you use other web service, you may need to format your request body to match what is being passed from a web form.