Multiplayer - Host <--> Peer switch need help!

0 favourites
  • 2 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • At half way through my multiplayer game, I require the Host and Peer to switch. So, I disconnect them from the Room and Server, send them again to the Login layout, this time with a different common GAME_NAME and ROOM. The previously peer enters that layout first, which should now become a Host.

    Both players do log in to Signalling correctly, however, this time, Auto-join never happens. Players are not joining the room. I can't figure out why.

    Possible issue: I had synced 2 objects. I am assuming as I disconnected both, the syncs would also go away. And the Login layout would re-sync the objects appropriately again?

    What am I missing? Or what should I try?



  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It kind of depends on what you are trying to achieve.

    From what your saying, that autojoin doesnt work when trying to reconnect, has likely to do with events for disconnecting, reconnecting and joining are happening too fast, but without the events involved its hard to say whats happening.

    I solved some issues with similair situations, where the host disconnects, and migrates to one of the peers, having the old host reconnect as a peer, preserving game state. This involves keeping track of the Peer IDs assigned, and remembered, same goes for the room name ofc.

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