How do I set up STUN/TURN server for Multiplayer object?

0 favourites
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • I am not a professional multiplayer producer, but Multiplayer object has opened my eyes to the possibility of making multiplayer games.

    I have spent four months using Multiplayer object to create multiplayer games, but after the release, more than 30% of the gamers could not join the room correctly even though they could connect to the server.

    I myself can only use Chrome, but not Edge, and even whether the network is home or 4G will affect whether I can join the room.

    This means I can't use Multiplayer object to make games, I can't release a multiplayer game that only some people can play.

    This is a huge blow to me, and it means that I have four months of wasted effort.

    I posted an article asking about this and I was told to set up a STUN/TURN server, which may be my last resort.

    I really like the Multiplayer object.

    I really want to find a stable multiplayer solution where everyone can connect smoothly, and Multiplayer object seems to be my best choice.

    How do I set up STUN/TURN server?

    Do the articles on the web about STUN/TURN server setup (like https://www.red5pro.com/docs/installation/turn-stun/turnstun/) work with Construct 3?

    Or what should I do to make the Multiplayer object available?

    I really want to be able to use Multiplayer object for multiplayer games, thanks!

  • If you have to ask here, you're probably not going to want to or have the ability to set up your own TURN server. This also isn't really the place to ask either, since it's outside the scope of these forums and you probably won't get much help. STUN is also not particularly relevant here, as it is already included for free and setting up your own isn't going to make much of a difference.

    Just using a TURN server is another matter though. There are websites/companies that provide TURN server services for a fee. You simply sign up for their services, point your app at the URL provided by them and provide the proper credentials with the multiplayer "Add ICE server" action.

    That's pretty much it and will solve most of your connectivity issues.

  • Copy those credentials andd add them before your signal server.

    source: metered.ca/tools/openrelay

  • Copy those credentials andd add them before your signal server.

    source: metered.ca/tools/openrelay

    I tested it with the Multiplayer chat example that comes with Construct 3 and my Edge still doesn't connect properly.

    I have tried turn:openrelay.metered.ca:80 and turn:openrelay.metered.ca:443, but it doesn't connect properly whether I add a single ICE or both.

  • >

    >

    >

    > Copy those credentials andd add them before your signal server.

    >

    > source: metered.ca/tools/openrelay

    I tested it with the Multiplayer chat example that comes with Construct 3 and my Edge still doesn't connect properly.

    I have tried turn:openrelay.metered.ca:80 and turn:openrelay.metered.ca:443, but it doesn't connect properly whether I add a single ICE or both.

    It'll be stuck here.

  • > It'll be stuck here.

    Actually, that seems to be working and your program is not doing what it should.

    One side is connected as host, the other as peer, so there IS a connection ;)

    My bet is that you've edited the example or trying to run your own.

  • > > It'll be stuck here.

    >

    >

    Actually, that seems to be working and your program is not doing what it should.

    One side is connected as host, the other as peer, so there IS a connection ;)

    My bet is that you've edited the example or trying to run your own.

    That's the problem. Edge can connect to the room, but there's no way to actually join.

    I haven't touched anything at all other than adding the ICE server, and I understand what I'm doing.

    chrome and other browsers will look like this:

    Edge never officially joined the room, It just found the room.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > > > It'll be stuck here.

    > >

    > >

    >

    >

    >

    > Actually, that seems to be working and your program is not doing what it should.

    >

    > One side is connected as host, the other as peer, so there IS a connection ;)

    >

    > My bet is that you've edited the example or trying to run your own.

    That's the problem. Edge can connect to the room, but there's no way to actually join.

    I haven't touched anything at all other than adding the ICE server, and I understand what I'm doing.

    chrome and other browsers will look like this:

    Edge never officially joined the room, It just found the room.

    I'm not an exception, it's just that it's Edge on my computer that has This question.

    In fact, everyone's situation is different, and from the feedbacks I've received, almost every browser can have this problem, sometimes it may be fine with a different browser, sometimes you have to change the network, and sometimes there is no solution.

  • I don't know if this is the norm for everyone, or if my country is in Asia and the players who play my game are in Asia, does this affect the connection?

  • If it works from chrome and not edge from the same connection, it's clearly not a connection problem, which means it has nothing to do with stun/turn to begin with.

    Again, if it works in Chrome, it also doesn't have anything to do with where in the world you are located.

  • Are you using the example in edge as both host and peer ? if so, is edge's inprivate browsing able to distinct between 2 sockets ? hmm

    Are you able to connect from edge as peer, to a chrome host ?

  • If it works from chrome and not edge from the same connection, it's clearly not a connection problem, which means it has nothing to do with stun/turn to begin with.

    Again, if it works in Chrome, it also doesn't have anything to do with where in the world you are located.

    Browser switching does not affect IP connections, so what is more likely to be the problem?

    Is there any chance that this can be resolved?

  • Are you able to connect from edge as peer, to a chrome host ?

    No, Edge seems isolated from the world.

    Are you using the example in edge as both host and peer ? if so, is edge's inprivate browsing able to distinct between 2 sockets ? hmm

    I don't know what to look for, maybe you can give me the steps to confirm, thanks.

  • This is the difference I found in the F12 network, Edge seems to be connected to timeout

    Edge:

    Chrome

  • > If it works from chrome and not edge from the same connection, it's clearly not a connection problem, which means it has nothing to do with stun/turn to begin with.

    >

    > Again, if it works in Chrome, it also doesn't have anything to do with where in the world you are located.

    Browser switching does not affect IP connections, so what is more likely to be the problem?

    Is there any chance that this can be resolved?

    I just tested on my laptop, from regular edge as host, to an inprivate edge as peer.

    Works perfect, did a bunch of connection attempts in a row, no dropped connections or unable to connect. So it is not a browser thing like your implying.

    Did a test afterwards, with regular edge to regular edge, the same. No problems.

    Microsoft Edge

    Versie 102.0.1245.41 (Officiële build) (64-bits)

    And when I went to check on the version, it started updating lol

    Perhaps you have a network configuration issue, or have a firewall that's working harder then it should. Or perhaps you're using a VPN. There is a whole range of things that could be the culprit really.

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