Scirra-hosted multiplayer TURN server

0 favourites
  • 6 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Update November 2nd 2022: after running the TURN server as an experiment for about a month, we have determined we can continue to provide it in the long term. We have now updated the Multiplayer documentation to include the fact we run an official TURN server. The details below have been updated to mention the current status of the TURN server rather than its experimental status.

    Scirra is now hosting a TURN server. This is free and automatically enabled for all uses of Construct's Multiplayer feature, providing you connect to the default signalling server (wss://multiplayer.scirra.com).

    What is a TURN server?

    See the page on connectivity in the first multiplayer tutorial for background.

    In short, Construct's Multiplayer uses peer-to-peer connections, so hosts and clients establish direct connections to one another rather than going through a central server. This usually works well, but one downside is that due to the messy architecture of the Internet, peer-to-peer connections are not always possible across certain networks. This is more common with cell networks, such as trying to connect a phone on a 4G network to a PC behind NAT.

    TURN servers solve this by acting as a relay. If two devices cannot establish a direct connection, they instead both connect to the TURN server, and the TURN server relays messages between them. This is slower, but the connection would otherwise fail if a direct connection cannot be established.

    Previously there was no default TURN server for Construct's Multiplayer feature and some connections would fail depending on the device's networks. Now they ought to succeed most of the time, unless there are further tight restrictions on the network that prevent a device even from reaching the TURN server.

    Scirra's TURN server

    Scirra is now hosting a free TURN server for use with Construct's Multiplayer feature to help ensure connections work between devices.

    If your project uses the default signalling server at wss://multiplayer.scirra.com, you do not need to take any action. The signalling server now automatically sends the details of Scirra's TURN server and the Multiplayer object will automatically resort to connecting via the TURN server if a direct connection cannot be established.

    In order to prevent abuse, Scirra's TURN server has a bandwidth limit for connections. It is intended for use only with Construct's Multiplayer feature with a reasonably well-designed game that does not transmit excessive amounts of data. If it is used outside of this purpose we may take steps to limit access to our intended purposes only.

    The TURN server's geographic location is the east coast of the USA. The quality of service of a connection using the TURN server will vary depending on the geographic location of devices. We recognize that not everywhere in the world has a good quality connection to the USA, but we are providing this service for free on a best effort basis.

    Disclaimer

    Scirra aim to host the TURN server permanently as a free service. While we hope we can provide a useful service in the long term, we reserve the right to, at any time and for any reason: withdraw this service temporarily or permanently; make any alteration to the provided quality of service; and block abusive or unwanted connections at our discretion. We will be providing this service on a "best effort" basis: while we hope to provide a useful service, we do not guarantee any particular availability or quality of service.

    While we reserve the right to end this service at any time, we will endeavour to provide 30 day's advance notice if we make the decision to end the service permanently, in order to provide some time for alternate arrangements to be made.

    If the free TURN server is unsuitable for your needs for any reason, you can still host your own TURN server and set the Multiplayer object to use it by using the Add ICE server action on startup. The previous tutorial link includes some information about hosting your own TURN server. We would particularly recommend this for any large-scale or commercial uses of Construct's Multiplayer feature, as we do not provide any specific guarantees of the availability or quality of service of our free TURN server, which will be shared between all Construct users and projects.

    Try it out

    If you previously had difficulty establishing connections with Construct's Multiplayer feature, give it another go! It may well work now.

  • Wow, this is great news!! It is time Scirra start putting more and more effort towards multiplayer.

  • Great news, thank you.

  • This is a great news! And I'm thinking of making a multiplayer game too, what a right time to prototype my game.

  • This is great news.

    This summer I compared the free Photon tariff and Scirra multiplayer. And just there were problems with the connection through mobile operators.

    I think now this problem is solved.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • After running this service for about a month, we're happy to now move this out of experimental status to an officially supported service. The original post has been edited to reflect this and the fact we host a TURN server has now been added to the Multiplayer documentation. However please note the disclaimer, which points out this service is provided for free on a "best effort" basis, and we do not guarantee any particular quality of service. If this is unsuitable for your needs, you can also host your own TURN server, which is also covered in the documentation. While we reserve the right to end this service at any time, we will endeavour to provide 30 day's notice if we decide to shut it down permanently, in order to allow time for alternate arrangements to be made.

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