[r174] Multiplayer - Sync object does not create Containers

Bugs will be moved here once resolved.

Post » Thu Jul 03, 2014 7:38 pm

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

Attach a 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
Posts: 24
Reputation: 737

Post » Fri Jul 04, 2014 9:07 am

I have the exact same bug, it affects really badly my project design :(
Posts: 1
Reputation: 177

Post » Fri Jul 04, 2014 2:41 pm

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.
Posts: 2,457
Reputation: 15,177

Post » Fri Jul 04, 2014 5:30 pm

@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?
Posts: 24
Reputation: 737

Post » Mon Jul 07, 2014 2:51 pm

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.
Scirra Founder
Posts: 25,207
Reputation: 200,355

Post » Mon Jul 07, 2014 7:01 pm


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

Code: Select all
inst = this.runtime.createInstance(type, this.runtime.running_layout.layers[type.default_layerindex], -1000, -1000);

It makes sense now, the object is created at -1000, -1000 with contained objects.
Posts: 24
Reputation: 737

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests