Multiplayer secondary host

0 favourites
  • 4 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • I was reading the Multiplayer tutorials and when I read that when the user acting as host server leaves the room, all the other peers are kicked out of the room, I was a bit upset.

    Wouldn't it be better to have a secondary "inactive" host who takes over the role when the primary host leaves?

    I think it's quite annoying if, let's say, 5 people are playing, and the first who entered the room leaves, the game is over, but if any other leaves, the game isn't over.

    Maybe the signaling server should add another role (scndHost) and dynamically manage who is the Host, the scndHost, and the peers, depending on who leaves the room at any time.

    The game I'm working on cannot afford to kick out everybody just because the first who entered the room leaves.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • +1, struggling with this too...

  • I would like Ashley to say something about this

  • The main reason it's not supported is because it's incredibly complicated. If the connection to the host drops without warning, then the clients may be missing important state information that only the host had, so cannot take over as host. To mitigate that you'd need to continually sync data from the host to other peers so that they can take over if need be, but since this is all game-specific data the multiplayer engine can't handle that for you - you'd have to do an awful lot of events for ongoing synchronisation and then a tricky transition from peer-state to host-state while hoping all the peer reconnections work (and at that point some of them could fail, e.g. if the peer who is becoming host is behind a NAT that only allows them to act as peer and not host, so then nobody can connect and the game fails anyway).

    One way of solving this would be to run the host on a dedicated server instead.

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