Multiplayer - Peer not connecting to host

From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Hello .

    I've been messing a lot with Construct 2's multiplayer function recently .

    I used the chat room example by scirra as a foundation for my project .

    But , the connection is only successful on a local network . It fails whenever i try to connect with my friends across the country .

    The problems are :

    1 - The peer isnt able to see the host and vice versa .

    2 - The peer and host's messages dont show up for each other .

    3 - ~20 seconds after the peer joins the room , he gets kicked out .

    These problems are ocurring both in my project and in scirra's official chat room .

    Any help ? Thanks in advance !

    PS : Sorry for bad english

  • You likely have a network issue. NAT traversal is not failproof, especially through double NATs depending on how they are set up. Firewalls may possibly get in the way as well.

    Are you in control of network configuration at either location? University/school networks can be pretty restrictive.

    Try having the host in an alternate location.

  • First of all , thanks for the response :D

    I am in control of my network , just like my friends are in control of theirs .

    What are some of the other things i can do other than disabling the firewall ?

  • Use a TURN server

  • As above, use a turn server. This is done in construct via

    Add ICE server

    Add a custom Interactive Connectivity Establishment (ICE) server used by WebRTC to establish connections between peers. There are a couple of built-in public STUN servers used, but you can also provide your own TURN servers to enable connectivity through certain kinds of NAT. A username and credential can also be optionally provided if the server requires them.

  • Thanks , ill look into creating a turn server

    Just for curiosity , is there any way i can connect players online using Hamachi ( LAN ) ?

    I tried to , but it didnt work out

  • twilio.com

    xirsys.com

    Both of these offer managed STUN and TURN servers. Xirisys offers a free developer account with limited bandwidth. Enough to get you started.

    If you're brave there are two open source servers I'm aware of

    creytiv.com/restund.html

    github.com/coturn/coturn

    If you're really brave, you could set up a chat server with websockets. I've successfully used FLECK to connect C3 to, but you'll need to know C#.

    github.com/statianzo/Fleck

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you all so much ! I got a TURN server working using Xirsys :D

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