Multiplayer - Simulating latency and missing messages.

Discussion and feedback on Construct 2

Post » Mon Nov 24, 2014 12:26 am

Hey guys, just wanted to see if anyone has been playing with simulating latency and experiencing missing messages sent between host and peer.

Perhaps I am understanding it wrong but if I send a reliable ordered message and it isn't received, shouldn't it keep on sending it until it is received?

What I am finding is that if I simulate latency around 10 seconds that these reliable messages aren't that reliable anymore. Perhaps its a problem with how c2 simulates latency?

From the manual under simulate latency it says, "The packet loss indicates the chance an unreliable message is lost entirely, or in the case of reliable messages that retransmission is necessary and the latency is multiplied." I'm just wondering why my reliable messages are being lost if that is the case.

Anyone have a similar experience or advice on this issue?
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280

Post » Mon Nov 24, 2014 2:05 am

https://db.tt/oNeL3Qsp

Here is a simple example cap if you would like to see it for yourself. Just open two windows side by side and press the button a bunch of times. Works well with lower latency simulations but with a 10 second delay it breaks pretty quickly.
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280

Post » Mon Nov 24, 2014 3:12 pm

10 seconds is a long time.

I cant really think of a real world scenario(maybe a flatmate torrenting), that would cause a 10 second latency.

I live in Aus and it only takes 150-250 ms to send and receive messages from my server in the US.

The longest i have seen is 1500ms from my dads satellite connection.

Maybe when Ashley was building the multiplayer plugin he didn't consider anything over 5 seconds?

On an afterthought its probably not anything to do with the messages, rather the host kicking the peer after a few seconds of dodgy connection.

Best Regards,
Tom
B
10
S
2
G
1
Posts: 92
Reputation: 926

Post » Mon Nov 24, 2014 3:28 pm

10 seconds is unrealistic - it's a "time out and fail" scenario. The multiplayer engine has some limits about ignoring messages which are 20-30sec+ out of sync as they are probably due to clock synchronisation issues. 3 seconds is an extreme latency in practice.
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031

Post » Mon Nov 24, 2014 6:49 pm

I use this tool to simulate latency, jitter and drops: http://www.tmurgent.com/appv/index.php/ ... ation-tool

It's called "TMNetSim". Downloads are at the bottom (you do not need to use the demo on the page!). You set it up as a localhost proxy and tweak the settings until you get your preferred flavor of network-shittyness.

It's a bit broken, crashes often, and sometimes requires several restarts. Still a golden tool for multiplayer gaming, though!
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Mon Nov 24, 2014 6:53 pm

@Fimbul
It's a bit broken, crashes often, and sometimes requires several restarts.

Sounds like an old banger. lol
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Mon Nov 24, 2014 6:54 pm

hundredfold wrote:@Fimbul
It's a bit broken, crashes often, and sometimes requires several restarts.

Sounds like an old banger. lol

Still worth it ;)
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Mon Nov 24, 2014 7:05 pm

Oh yes, I agree!
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Tue Nov 25, 2014 3:09 am

Thanks for the advice everyone, I had a feeling it wasn't a bug. The reasoning makes sense I was just trying to prepare the game for the worst and couldn't figure it out. I've added the 'on peer disconnect' condition and its working fine now.

Still, might check out that old banger when I get the chance, lol. :)
ImageImage
B
130
S
23
G
7
Posts: 1,078
Reputation: 13,280


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests