Simple Puzzle (Maths) - Multiplayer - How to

Hi

I am thinking create an Maths puzzle app.
I will ask random maths questions to the players for 30 seconds.

I can do that for single player.
I haven’t done multiplayer concept so far. I have no idea where to start it.
Please advice it.

I am developing it in javascript

Please someone advice me.

If you search this forum for the keyword ‘multiplayer’ a few good topics will pop-up.

Just now i saw your reply. Thanks.
I was just reading about node.js and socket.io during this time. I will do the search as you said.
Do i need node.js when i use socket.io in cocos2dx?

i found there is a socketio test class.
If i use socket.io, then must i use node.js?

Well seems like you coukd get a bit help with this for multiplayer selections on JS

Thanks for the links.
I am working on it. Practicing in localhost.
Will it work in Android and IOS? If i use socket.io, node.js and mongoose?

@agriz
You can learn more about cocos2d-x js and multiplayer in this beginner tutorial

1 Like

Those tutorials are using websocket.
I am planning to use socket.io

http://www.cocos2d-x.org/docs/api-ref/js/v3x/
I am not able to find doc for socket.io here.
But in internet, i can see cocos2dx is supporting socket.io

I made a simple coding on my localhost with socket.io and it is working for me. I need to convert it into cocos2dx.

Please provide some documentation for using socket.io with cocos2dx.
Thanks again…

The best place to look for a example about a particular functionality are the tests that come with cocos2d-x. Here you’ll find a example.

var SocketIO = SocketIO || window.io;

This line is throwing error for me.
I have to include the socket.io.js file to make it work.
Does cocos2dx have any module for socket.io? I guess there should be a module. But i can’t find it :frowning:

…?
Can you please share the link for socket module implementation in cocos2dx javascript?