Online Multiplayer Object Sync Problem

Report Construct 2 bugs here.

Post » Mon Jun 26, 2017 1:40 pm

This is incredibly difficult to debug since it seems non-deterministic and latency-sensitive. In particular latency issues are very thorny since simply setting a breakpoint in the debugger changes the latency and can cause issues to change :-
If you look in the browser console you can see it logging some errors about being unable to read data. I think it's failing to read data for some message, which causes it to fall back to an error path which means for some objects it considers it to have received no messages. In the multiplayer engine if an object does not receive data for ~3 seconds, it destroys it as presumably having timed out. So I think disappearing objects is caused by the timeout, and the real problem is being unable to read data. I've not been able to isolate it much further than that though. As ever producing an even smaller, simpler reproduction would help.
Scirra Founder
B
399
S
236
G
89
Posts: 24,535
Reputation: 195,412

Post » Sat Jul 15, 2017 5:29 pm

Ashley wrote:In the multiplayer engine if an object does not receive data for ~3 seconds, it destroys it as presumably having timed out. So I think disappearing objects is caused by the timeout, and the real problem is being unable to read data.

So couldn't you disable the part that destroys objects when timed out? Or maybe add some sort of option for it? It seems that the timeout-destroy creates more issues than it solves, at least in this instance. The problem of reading data only ever seems to be momentary, anyway.
B
25
S
11
G
3
Posts: 25
Reputation: 3,377

Post » Sat Jul 15, 2017 7:23 pm

bjayfont wrote:
Ashley wrote:In the multiplayer engine if an object does not receive data for ~3 seconds, it destroys it as presumably having timed out. So I think disappearing objects is caused by the timeout, and the real problem is being unable to read data.

So couldn't you disable the part that destroys objects when timed out? Or maybe add some sort of option for it? It seems that the timeout-destroy creates more issues than it solves, at least in this instance. The problem of reading data only ever seems to be momentary, anyway.

I second that. I think a simple action to manually override the destroying timeout would be really useful for specific cases like this one.
@Ashley It would be amazing if you could add this to your todo list for the next C2/C3 beta update. ;)
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Mon Jul 17, 2017 10:14 am

No, that's just papering over the cracks rather than fixing the actual underlying issue. There is data being received but it's not resetting the kill timer for some reason. And the kill timer is important in case the destroy notification was lost in transit, ensuring it reaches an eventually-correct state rather than piling up zombie objects when packet loss occurs.
Scirra Founder
B
399
S
236
G
89
Posts: 24,535
Reputation: 195,412

Post » Mon Jul 17, 2017 6:08 pm

Ashley wrote:No, that's just papering over the cracks rather than fixing the actual underlying issue. There is data being received but it's not resetting the kill timer for some reason. And the kill timer is important in case the destroy notification was lost in transit, ensuring it reaches an eventually-correct state rather than piling up zombie objects when packet loss occurs.

Well then I guess it's all up to you Ashley.
Is there any possible way to help you out with this? Is there something wrong with the samples that bjayfont provided you?
(Sample 1 | Sample 2)
ImageImageImage
B
64
S
24
G
78
Posts: 666
Reputation: 45,070

Post » Tue Jul 18, 2017 6:06 am

This is quite an interesting bug. The same hing happened to me aswell.
Image
B
29
S
15
G
12
Posts: 312
Reputation: 9,662

Previous

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest