agriz
March 4, 2016, 6:28am
#1
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
agriz
March 5, 2016, 7:45am
#2
Please someone advice me.
araker
March 5, 2016, 9:55am
#3
If you search this forum for the keyword ‘multiplayer’ a few good topics will pop-up.
agriz
March 8, 2016, 7:43am
#4
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
@padmnabh Ya I read too that Cocos API supports websocket and SocketIO and I intend to use those with node.js. I just don’t want to “re-invent the wheel” and try to find a good framework to work with.
I think I’m gonna go with Pomelo unless you know of any better one? I know there’s Maple.js but I think Pomelo is better supported.
agriz
March 9, 2016, 6:15am
#6
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
agriz
March 10, 2016, 6:49am
#8
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…
araker
March 10, 2016, 9:22am
#9
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.
agriz
March 10, 2016, 3:55pm
#10
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
agriz
March 12, 2016, 7:46am
#11
…?
Can you please share the link for socket module implementation in cocos2dx javascript?