Heavy Multiplayer problem

  • Problem Description

    Only Ashley can handle this, If talking short: If client to connects to server, then disconnects. And then connects to fresh launched another server - there(Only on client side) will be undestroyable duplicates of each object in "Sync objects section" staying on positions were they was on previous server. If player refresh page\client and connect again - bug will not occur. So its repro only if you played once on one server and connect to another after it. Repro made on default multiplayer example. I will upload video of repro steps here too.

    More detailed: Im making multiplayer game, its all in one capx. There is a server and client in separated by groups. Server part exports with NW.js, and client uploads on site via html5. When client plays on one server once, when he disconnect and connect to another server(that was launched during client was on old server) there will be all synchronised objects duplicated(Only on client side). And if you try to destroy it on client, they will respawn again, like its still connected to old server.

    That means you cant make stable server-side game. Player after playing once on one server will have duplicated objects on other servers, until he refresh page.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/950 ... P_bug.capx

    Description of Capx

    Repro made with default Multiplayer realtime game example - only thing added is button on client to move back from game to login menu. Nothing else was changed.

    Steps to Reproduce Bug

    • Export game via NW.js.
    • Launch game from NW.js and connect to be host.
    • Launch game from construct via chrome for example, and connect as client.
    • Close NW Host.
    • In Chrome game press spacebar to go back to menu.
    • Launch again NW game and connect as host.
    • Connect with chrome again.

    Observed Result

    Two peers, one from NW and your own in Chrome.

    Expected Result

    You will see third Peer - its duplicated peer from previous server.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)

    Operating System and Service Pack

    Windows 7

    Construct 2 Version ID

    Currently its r216, but was appeared in previous builds.

  • Ashley Bump, this bug means you cannot make stable server\client game with multiplayer plugin. Any solve?

  • Besides kids playing the example and spamming the chat with inappropriate stuff (changed the game_name variable later on...), I could not reproduce this bug.

    Everything works fine for me but well Ashley should give it a try too just to make sure.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.scirra.com/forum/specific-problem-with-multiplayer-plugin_t152551?&hilit=Multiplayer

    kkkk

    I've been there, no one in Scirra could answer on this issue, but I managed to find the solution to duplicate objects.

  • the problem is that in our view when loading a layout that has its own events page and if it be disabled groups we imagine that these groups continue disabled when we return to layout, but that's not what happens when the HOST and PEER enter the room they enable their command groups but these same groups are not disabled when you exit the layout or disconnects from the server, or when you return in a new room the command groups are still enabled, duplicate objects happen because for PEER now has both enabled groups.

  • I can't reproduce this in Chrome. It seems to work just fine and there is no third peer, even though the example .capx has a serious bug: as Reinarte points out, it returns to the title screen while leaving the Host/Peer groups activated, so it's possible both end up activated, which will cause problems. You should make sure both groups are disabled again when returning to ensure when the next game starts, only the correct group is activated.

  • I can't reproduce this in Chrome. It seems to work just fine and there is no third peer, even though the example .capx has a serious bug: as Reinarte points out, it returns to the title screen while leaving the Host/Peer groups activated, so it's possible both end up activated, which will cause problems. You should make sure both groups are disabled again when returning to ensure when the next game starts, only the correct group is activated.

    Leveraging that Ashley is online, you know that it is not possible to complete the login of the player in Scirra Arcade using the native plugin GooglePlay Construct 2 ..

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