How do I make a multiplayer game with fixed rooms?

0 favourites
  • 4 posts
From the Asset Store
Add calm and a lounge vibe to your games with these 8 tracks
  • Hello,

    I'm trying to make a multiplayer real-time game, but, reading the tutorials, i saw that Multiplayer Plugin works creating a room when the first player joins, and the other will connect directly to this host.

    This means, when that host leave the room, all the others will lose the connection.

    I need a way to create a fixed host with many rooms, so everybody can join without worring about the host going away.

    Any sugestion? Is it possible with Multiplayer Plugin? Or only with sockets.io/websocket plugin.

    Thanks

  • Hello, you could try to make it like this:

    Save the hosts name in a variable (ex. "SavedHostName")

    On kicked -> Join room "SavedHostName"

    And then while that happen, display a "Finding new host" message so the user now a new host is being "found".

    That would be a way to handle it, so all players come together after the host left.

    But on your question with creating a fixed host,

    you may need to make it like having an instance (or many) of the game running on a server, while actually not doing anything else but handling messages/syncing positions.

    • Conti
  • Thanks for the reply SgtConti.

    About have an instance (or many) of the game running on a server, how exactly this could be done?

    A nodejs server running a manually created file that handles the messages/syncing positions?

    Does the Multiplayer Plugin have an easily way to do that?

    Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • With the multiplayer plugin you could open multiple instances/games and assigne them to a different room.

    And then modify the client to display that there are 10 rooms avaialble (In case you have 10 instances of the game running on a server),

    and if the player chooses room 1 you join the first room, room 2 chooses room 2, etc.

    But for that you need on the host (server) side, to have assigned each instance to a seperate room and to decrease the load of the gpu, make everything invisible (The whole layout), even tho it's invisible, the positions are still being calculated and synced with each peer.

    On the client site you can request the amount of peers in each room to display it besides the name of the room, if you have a player cap per room.

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