In multiplayer, clients in the local network (connected to the same Wi-Fi) find each other 100% ?

0 favourites
  • 4 posts
From the Asset Store
This sound pack comes with 100 high quality, ready-to-use sound effects for all kinds of games.
  • I have heard that people who are next to each other (connected to a same wifi) can find each other in 100% of cases and the game runs without problems, and the problems with NAT etc. are only for clients that connect to distant networks. are connected is it right ?

    Tagged:

  • It depends entirely on the network configuration. If two devices are able to message each other directly over a LAN, then WebRTC should be able to as well. But if my experience of writing multiplayer code has taught me anything, it's that you can't really assume anything about networking. There could be unusual configurations, firewalls and other security software, buggy routers, and a bunch of other stuff that could prevent any two devices from being able to directly message each other, regardless of the network type.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends entirely on the network configuration. If two devices are able to message each other directly over a LAN, then WebRTC should be able to as well. But if my experience of writing multiplayer code has taught me anything, it's that you can't really assume anything about networking. There could be unusual configurations, firewalls and other security software, buggy routers, and a bunch of other stuff that could prevent any two devices from being able to directly message each other, regardless of the network type.

    Thank you for your reply.

    And what should we do in order to make sure that the players are 100% connected?

    And another question, in general, if the game is designed in such a way that only people who are nearby need to join the game, is there a solution other than multiplayer? For example, using Bluetooth, or share it, etc., to exchange information without the need for a server. Does construct have an alternative way?

  • And what should we do in order to make sure that the players are 100% connected?

    I don't think 100% connectivity is achievable. The Internet is a huge mess of different protocols, restrictions and configurations. It's just infeasible to support every possible combination of networking and software setups.

    The stock Multiplayer feature can achieve about 95% connectivity, which is pretty good. To beat that you'd probably have to set up and configure your own TURN server, and unless you are an experienced network engineer, you will probably not be able to beat 95%.

    You could use some entirely different technology for multiplayer, like WebSockets to a central server, but Construct does not have its own support for that, so you'll need either third-party addons or a custom solution. That still may not achieve 100% connectivity.

    I don't think the web provides any way to directly message over a LAN - you either use WebRTC for peer-to-peer connections (which the Multiplayer feature already uses), or you go via a web server.

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