0 Favourites

Multiplayer - Simulating latency and missing messages.

  • 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?

  • 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.

  • 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

  • 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.

  • 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!

  • Fimbul

    [quote:287mwetr]It's a bit broken, crashes often, and sometimes requires several restarts.

    Sounds like an old banger. lol

  • Fimbul

    [quote:20430o7r]It's a bit broken, crashes often, and sometimes requires several restarts.

    Sounds like an old banger. lol

    Still worth it

  • Oh yes, I agree!

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)