multiplayer plugin doesn't handle internet disconnection

Bugs will be moved here once resolved.

Post » Mon Sep 07, 2015 8:21 am

Problem Description
there is two problem :
1 . when you disconnect from the internet some times host or peer (mostly host) dont know they disconnected and disconnect from signalling will not trigger
2. when internet disconnection happens (not closing the browser tab) synced object will destroyed in peer game but they did not actually destroyed in the game
Attach a Capx
you can test this with scirra ghost shooter multiplayer example (but you have to change it and make game dont destroy peer player)
Description of Capx
Steps to Reproduce Bug
  • Step 1: use multiplayer plugin and sync an object
  • Step 2 : join to that game with your phone and your pc (now phone is host and pc is peer)
  • Step 3 : disconnect your internet connection in your phone . now you can see the synced objects are destroyed in pc but they actually didn't destroyed in the game and because of disconnection they are destroyed.
    but if you insted of disconnection close the phone browser now you can see the object will not destroy
Observed Result
multiplayer plugin doesn't handel internet disconnection well
Expected Result
multiplayer plugin dosent handel internet disconnection well
Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)
Operating System and Service Pack
windows 8 and 10
Construct 2 Version ID
Posts: 246
Reputation: 1,786

Post » Tue Sep 08, 2015 4:22 pm

1. Under some circumstances the host (or signalling server) may not notice immediately that a peer has become disconnected, but on both ends it should time out after about 20 seconds if they cannot communicate. It's not clear from this report if you have checked if this is happening; I assume the timeout mechanism does work correctly, otherwise the signalling server would clog up with zombie peers, and I can see it is not.

2. I'm not clear what you mean by this: if you get disconnected then the multiplayer engine should time out all peers as it realises it can't communicate with anyone. It may or may not destroy your own player depending on your own events. I am also confused as to how you appear to report that the bug is objects are not destroyed, when your "attach a capx" instructions indicate to change the game to not destroy objects, which makes it sound like it is simply a consequence of that change.
Scirra Founder
Posts: 25,291
Reputation: 200,966

Post » Tue Sep 08, 2015 9:14 pm

1. Yes on your server it will get disconnected
But in host game (since there is no connection) when we are host some times (when we disconnect internet for 10-30 secound) the "on signalling disconnected" is not trigged and when we compare the peer count host still show 1 peer (itself) but it shouldn't show 1 peer becouse its already disconnected!
1.5 : and another thing is when a disconnection happens and a peer get disconnected it doesn't try to reconnect to that game again and we must try to reconnected it and that will get alot of your server resources (we must connect to signalling and then login and then join room and... when you can simply reconnect that peer to the game fast (you alredy have the host ip)) reconnection must happen inside your code not us ! (I mean we must connect to the host and connect to signalling server at the same time and this is what make multiplayer plugin unstable we could simply use signalling just for establish to host and then get disconnect from it) and when we want close the room we just connect and tell the host that room is close or...
2. Its easy : when a latency happens for a synced object that object get destroyed in peer side and it shouldn't get destroy for a latency or internet problems it must destroy when on host get destroy
Posts: 246
Reputation: 1,786

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests