[r174] Multiplayer - Sync object does not create Containers

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Problem Description

    When using Multiplayer Sync action with a Container object, contained objects are not created on the peers side.

    Attach a Capx

    onedrive.live.com/redir?resid=39A2487877002126!2573&authkey=!AFSLnxlfMWYsfJk&ithint=file%2c.capx

    Description of Capx

    Open the Capx

    Steps to Reproduce Bug

    • Open the Capx
    • Runs on 2 tabs

    Observed Result

    On the first tab, a blue circle with a green circle inside is created

    On the second tab, only the blue circle is created

    Expected Result

    On both tabs, a blue circle with a green circle inside must be created

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: ?

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    r174

  • I have the exact same bug, it affects really badly my project design

  • OP. You might want to do some more studying on how the MP works. It doesn't look like so much a bug, but lack of primary network development.

    The container is creating both objects. However based on our design logic there are flaws.

    1. The host only creates 1 Container set(ie both sprites)

    2. The client creates 2 Container sets. The blue sprite is covering the first one and the green sprite is -1000,-1000. This results in the look that the green sprite isn't being spawned.

    Seriously while c2 MP plugin I think is the easiest. You both might want to consider going through the tutorials of just C2 core learning tuts. Rather than jumping into the MP.

    *here are some stuff

    *You don't sync objects to peers

    *there is no peer tracking

    *don't assume that containers fall into a shape. Assume they are off screen. So always make sure to set there position.

    * since the client get's 2 instances and the host gets 1 instance of your object your not handling peer connections.

    I get the feeling there is a lot of guess work going on in this MP capx. I don't see a bug. Just not a solid logic flow and proper use of the MP plugin or C2 moderate functionality.

  • jayderyu thanks for your reply

    I think you're not getting the point of my bug report, I wanted to create the least amount of events, so no I'm not doing peers sync/tracking/whatever

    Indeed the synced object is created at (-1000, -1000) but on the host side is created at the origin point and not on peer side? the behavior is different, don't you think it's not a bug?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as not a bug. You only sync one of the objects, so the other object in the container will be created, but not synced.

  • Ashley

    Thanks for your answer, I spot this line in the multiplayer login code

    inst = this.runtime.createInstance(type, this.runtime.running_layout.layers[type.default_layerindex], -1000, -1000);
    [/code:3lkkc4da]
    It makes sense now, the object is created at -1000, -1000 with contained objects.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)