Online Multiplayer Object Sync Problem

Report Construct 2 bugs here.

Post » Tue Apr 25, 2017 5:23 am

Problem Description
Sync'd objects, on the peer side, pop in and out randomly, and may not all be created or destroyed when they are on the host side, but some will. This only happens with latency, simulated or not, and doesn't seem to be cause by either simulated PDV or packet loss, only latency, simulated or otherwise.
Attach a Capx
https://drive.google.com/file/d/0B8SU_2 ... sp=sharing

Description of Capx
The capx is as stripped down as I think it can be while still making the bug easily reproducible. I believe it might have something to do with bandwidth or just client inputs in general, so I set three client input values to constantly update, and that seems to be the main source of the bug.

Steps to Reproduce Bug
  • Start up two copies, one host and one peer, in debug mode
  • Look at the object counts for Peer and Test and watch how they deviate
  • If nothing happens at first, wait a little longer, or refresh/restart the peer copy.

Observed Result
Object counts go down or even zero, then back up but sometimes not all the way. i.e. The test count which should be 5 will drop down to 0, then come back up to 3, then maybe go up to 5 or go back down to 0 again.

Expected Result
I expect objects not to randomly be destroyed on the peer side.

Affected Browsers
  • Chrome: YES
  • FireFox: n/a
  • Internet Explorer: n/a

Operating System and Service Pack
Windows 10 Home 64-bit

Construct 2 Version ID
Release 244 (64-bit)
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Tue Apr 25, 2017 12:32 pm

Did a quick check:

There appears be an issue when there is no position syncing happening. At least from what I can tell.

Without position syncing for the test objects and peer objects (as in the given example above) one of the peer objects vanishes here on my system for the peer. (object count for peer)

When I enable position syncing for both objects, the object counts are as they are supposed to be.

This issue arises also arises when I just have the peer object with position synced and the test object without position synced.



PS
In the past I ran into this issue a couple times too without narrowing down where it originated from;
it happened when I tried to make my own position syncing system where I wanted to have the objects automatically created (synced) based on the peers created and maintained on the host side. (just the object amounts)

This did not work nicely in the past so I made creation and destroy events on peer/host for peers connecting/disconnecting on the host end.
This manual approach worked well, but required a lot testing and quite some extra events.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Apr 25, 2017 1:35 pm

lennaert wrote:Without position syncing for the test objects and peer objects (as in the given example above) one of the peer objects vanishes here on my system for the peer. (object count for peer)

When I enable position syncing for both objects, the object counts are as they are supposed to be.

This issue arises also arises when I just have the peer object with position synced and the test object without position synced.

So then Multiplayer Sync Object (none) pretty much totally breaks multiplayer whenever there's any significant amount of latency. That sounds like a bit of an issue.
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Tue Apr 25, 2017 1:45 pm

bjayfont wrote:
lennaert wrote:Without position syncing for the test objects and peer objects (as in the given example above) one of the peer objects vanishes here on my system for the peer. (object count for peer)

When I enable position syncing for both objects, the object counts are as they are supposed to be.

This issue arises also arises when I just have the peer object with position synced and the test object without position synced.

So then Multiplayer Sync Object (none) pretty much totally breaks multiplayer whenever there's any significant amount of latency. That sounds like a bit of an issue.



Not sure its due to the latency, with position syncing more information is passed along, potentially causing more lag/latency.
But seeing as the this scenario appears reversed here (more syncing works better) I am guessing there is a glitch somewhere in peer creation/count when no position syncing is used.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Apr 25, 2017 1:52 pm

It looks like that might not be the only problem. I tried setting every sync'd object to position sync and that did work with the capx I provided, but not with my project. Going to try to strip down my project to find another contributing factor to the bug, when position sync is enabled on all sync'd objects.
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Tue Apr 25, 2017 1:54 pm

lennaert wrote:Not sure its due to the latency, with position syncing more information is passed along, potentially causing more lag/latency.
But seeing as the this scenario appears reversed here (more syncing works better) I am guessing there is a glitch somewhere in peer creation/count when no position syncing is used.

When I set latency to zero in Simulate latency, or turn simulate latency off entirely, there seems to be no problem; the bug stops happening.
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Tue Apr 25, 2017 2:10 pm

update:

Irrelevant now
Last edited by lennaert on Wed Apr 26, 2017 7:37 am, edited 1 time in total.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Apr 25, 2017 3:20 pm

So I haven't narrowed it down totally yet, and I won't get the chance to until a bit later, but I think if you have positions synced on everything, the bug still persists if the peer object is constantly moving on the host side through the custom movement behaviour
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Wed Apr 26, 2017 1:17 am

https://drive.google.com/open?id=0B8SU_ ... HQwVWJiNkU
Another capx, this time showing object sync failing even when all objects sync'd all have position sync on. Either the test objects don't load in at all on start on the peer side, or they do load in, then disappear some seconds later. Setting latency to 0 in Simulate Latency fixes this, while setting PDV or packet loss to 0 seem to have little or no effect on it.
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Sat Jun 10, 2017 9:18 pm

bump
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests