How do I make server become host of multiplayer room?

0 favourites
  • 3 posts
From the Asset Store
Who wants to be a Millionaire Clone. An educational coding source
  • I am currently working on a team shooter + moba game, and I intend to use the multiplayer plugin.

    I know that the first player to join the room becomes the host. But I want all the players to be peers so no one has an advantage of seeing the game in real-time.

    Here are the steps for how the players will connect into a room:

    1. Auto join room and wait for 8 peers

    2. When 8 peers have joined, disconnect everyone

    3. Server hosts a room that all 8 peers join that room (making it now 9 peers when you include the host)

    4. Now all players are peers while the server is the host - just doing absolutely nothing but sending gameplay data.

    So now my question!! How do I get a signalling server (e.g. wss:// to become the host of a room?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The signalling server is an app that receives and conveys computer adresses, to make devices connecting to it able to communicate to eachother.

    The host for a game needs to be an application opened in a browser or as an app. (requires a screen etc)

  • There is no need to do all of that to achieve what you want.

    All you need to do is keep a computer/device ON 24/7 that is programmed to:

    1) Have a lobby (as a Host) and join a ROOM when up to 8 other players gather up.

    2) Since above will make the signalling server device get occupied in the game, you need some way to start another tab, and run another version of the game with Signalling server to search for another set of players.

    3) As a game ends, the running tab should close.

    That's how I think it can be done easily.

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