Connecting to wss://multiplayer.scirra.com ?

0 favourites
  • 6 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Hey hey,

    I realised that sometimes it simply doesn't connect to the signalling server but other times it does. To clarify what I mean: "On signalling connected" doesnt trigger sometimes. Is this normal?

    thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I dont know where it was posted, but Ashley mentioned there was a higher percentage incorrect connections then what you would get if you hosted and used your own signalling server. Thought it was roughly 10% ..

  • I have been fiddling with the wss scirra server a good bit in the last two days, so I have been the host for a number of people joining. I am trying to dissect the message structure that it uses to send messages back and forth in order to build a server capable of handling C2 multiplayer requests.

    Here is what I have so far:

    [quote:2ewmtymg]

    {"message":"welcome","protocolrev":1,"version":"1.0","name":"Scirra Multiplayer Signalling Server","operator":"Scirra Ltd","motd":"Welcome to the official Scirra Multiplayer Signalling server!","clientid":"O5Q0","ice_servers":["stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302","stun:23.21.150.121"]} 408

    08:54:16.107

    {"message":"login","protocolrev":1,"alias":"chrometest"} 56

    08:54:16.109

    {"message":"login-ok","alias":"chrometest"} 43

    08:54:16.226

    {"message":"join","game":"scirra-chatexample","instance":"default","room":"main","max_clients":0} 97

    08:54:16.228

    {"message":"join-ok","game":"scirra-chatexample","instance":"default","room":"main","host":true} 96

    08:54:16.342

    {"message":"peer-joined","peerid":"M414","peeralias":"killer805"} 65

    10:07:39.812

    {"message":"offer","toclientid":"M414","offer":{"sdp":"v=0\r\no=- 5154261754761039296 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:+W5BUlgt5Gqw3wuy\r\na=ice-pwd:Ca5LUZljwmLRvgjA65C6qXFi\r\na=fingerprint:sha-256 E5:E0:4F:E5:D4:C8:A1:6E:29:B6:8F:38:B2:13:89:AB:B1:BD:7A:0E:4F:31:57:0A:F4:73:70:F8:A3:B8:1A:A7\r\na=setup:actpass\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"offer"}} 486

    10:07:39.839

    {"message":"icecandidate","toclientid":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:1511920713 1 udp 2122260223 192.168.0.2 63580 typ host generation 0"}} 189

    10:07:39.841

    {"message":"icecandidate","toclientid":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:4081163164 1 udp 1686052607 x.x.x.x 63580 typ srflx raddr 192.168.0.2 rport 63580 generation 0"}} 223

    10:07:39.933

    {"message":"icecandidate","toclientid":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:345893049 1 tcp 1518280447 192.168.0.2 0 typ host tcptype active generation 0"}} 199

    10:07:39.942

    {"message":"answer","from":"M414","answer":{"sdp":"v=0\r\no=- 8922025134692592552 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:4if2QlwLZQU6NkKA\r\na=ice-pwd:GjdgtCNx+fMmyWf4m37nnvXW\r\na=fingerprint:sha-256 2D:3D:7B:6E:1F:03:6C:66:BA:47:68:F0:04:95:8E:3B:5D:76:30:BC:37:53:3A:D0:E1:2A:3C:B0:90:D3:A3:1E\r\na=setup:active\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"answer"}} 493

    10:07:40.403

    {"message":"icecandidate","from":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:2127136931 1 udp 2122260223 10.201.12.239 59060 typ host generation 0"}} 185

    10:07:40.408

    {"message":"icecandidate","from":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:4286680599 1 udp 1686052607 72.55.8.201 22627 typ srflx raddr 10.201.12.239 rport 59060 generation 0"}} 216

    10:07:40.508

    {"message":"icecandidate","from":"M414","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:810185811 1 tcp 1518280447 10.201.12.239 0 typ host tcptype active generation 0"}} 195

    10:07:40.513

    {"message":"confirm-peer","id":"M414"} 38

    10:07:44.433

    {"message":"peer-joined","peerid":"1GXE","peeralias":"teddy"} 61

    10:16:45.610

    {"message":"offer","toclientid":"1GXE","offer":{"sdp":"v=0\r\no=- 3531346402671484108 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:1FfOV/kNyL4l4LYP\r\na=ice-pwd:DaKFXfnkF/HSIb6BRpKPQ4dt\r\na=fingerprint:sha-256 E5:E0:4F:E5:D4:C8:A1:6E:29:B6:8F:38:B2:13:89:AB:B1:BD:7A:0E:4F:31:57:0A:F4:73:70:F8:A3:B8:1A:A7\r\na=setup:actpass\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"offer"}} 486

    10:16:45.615

    {"message":"icecandidate","toclientid":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:1511920713 1 udp 2122260223 192.168.0.2 52602 typ host generation 0"}} 189

    10:16:45.616

    {"message":"icecandidate","toclientid":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:4081163164 1 udp 1686052607 x.x.x.x 52602 typ srflx raddr 192.168.0.2 rport 52602 generation 0"}} 223

    10:16:45.707

    {"message":"icecandidate","toclientid":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:345893049 1 tcp 1518280447 192.168.0.2 0 typ host tcptype active generation 0"}} 199

    10:16:45.717

    {"message":"answer","from":"1GXE","answer":{"sdp":"v=0\r\no=- 7353467243507182183 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:IWUNE2kKdq/uFqKs\r\na=ice-pwd:fZPrpEbmwJgqeZJ5YkDj/eO7\r\na=fingerprint:sha-256 03:BF:28:7F:54:9A:06:6F:8E:2F:BA:DD:E7:A0:1C:BE:3D:F0:01:95:B9:F9:0E:4D:3B:BB:8A:C5:9C:43:DA:98\r\na=setup:active\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"answer"}} 493

    10:16:46.969

    {"message":"icecandidate","from":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:111704799 1 udp 2122260223 192.168.1.34 57742 typ host generation 0"}} 183

    10:16:46.977

    {"message":"icecandidate","from":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:1210811951 1 tcp 1518280447 192.168.1.34 0 typ host tcptype active generation 0"}} 195

    10:16:47.069

    {"message":"icecandidate","from":"1GXE","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:4038591243 1 udp 1686052607 84.101.170.238 57742 typ srflx raddr 192.168.1.34 rport 57742 generation 0"}} 218

    10:16:47.098

    {"message":"confirm-peer","id":"1GXE"} 38

    10:16:48.096

    {"message":"peer-joined","peerid":"5A4B","peeralias":"j"} 57

    10:35:20.574

    {"message":"offer","toclientid":"5A4B","offer":{"sdp":"v=0\r\no=- 3777036167362608847 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:vHbVR5RiMDbur7EP\r\na=ice-pwd:eW9tPPTEi3yV/RdhgwNqJ52n\r\na=fingerprint:sha-256 E5:E0:4F:E5:D4:C8:A1:6E:29:B6:8F:38:B2:13:89:AB:B1:BD:7A:0E:4F:31:57:0A:F4:73:70:F8:A3:B8:1A:A7\r\na=setup:actpass\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"offer"}} 486

    10:35:20.578

    {"message":"icecandidate","toclientid":"5A4B","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:1511920713 1 udp 2122260223 192.168.0.2 64178 typ host generation 0"}} 189

    10:35:20.578

    {"message":"icecandidate","toclientid":"5A4B","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:4081163164 1 udp 1686052607 x.x.x.x 64178 typ srflx raddr 192.168.0.2 rport 64178 generation 0"}} 223

    10:35:20.672

    {"message":"icecandidate","toclientid":"5A4B","icecandidate":{"sdpMLineIndex":0,"sdpMid":"data","candidate":"candidate:345893049 1 tcp 1518280447 192.168.0.2 0 typ host tcptype active generation 0"}} 199

    10:35:20.679

    {"message":"answer","from":"5A4B","answer":{"sdp":"v=0\r\no=- 2851996758598994455 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:sq58YHQDsLm8Dpuu\r\na=ice-pwd:IdScKPotWOwuFziMbTOhQBh7\r\na=fingerprint:sha-256 BF:D5:24:2D:87:46:61:30:21:75:63:41:3F:F4:EE:67:B3:62:CA:A9:6D:AB:12:F7:1C:26:C9:C3:A9:31:E5:18\r\na=setup:active\r\na=mid:data\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n","type":"answer"}} 493

    10:35:20.947

    1

    {"message":"peer-joined","peerid":"1GXE","peeralias":"teddy"}

    Name

    multiplayer.scirra.com

    multiplayer.scirra.com

    2 / 16728 requests | 0?B / 3.3?MB transferred | Finish: 2.3?hrs | DOMContentLoaded: 135?ms | Load: 134?ms

    This is with my client as the host of the chat room.

    Has anyone ever written any kind of guide on the API for the multiplayer in C2?

  • According to Stackoverflow, it looks like the Google STUN servers used for webRTC (on which C2 Multiplayer is based) are not 100% reliable. This would explain your not being able to connect.

    http://stackoverflow.com/questions/2006 ... 2-used-for

    http://stackoverflow.com/questions/2006 ... e-com19302

  • I see. So buying an own signalling server wont really solve the problem .. thanks

  • Well, I imagine if you made your own signalling server, you could avoid the Google ones. C2 uses the Google ones since they are free and available. I am planning on using a centralized server to avoid the need for a signalling server altogether.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)