Ashley's Recent Forum Activity

  • Intel GPUs are really weak, I don't know if they will run anything well

    If you have any issues I'd encourage you to post to the Bugs forum following all the guidelines. It would be strange if the game starts up in NW.js but not Chrome - they're both based on the same Chromium browser engine!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is that using the .capx you posted? I tested it on both an iPad Air 2 and Chrome on a Nexus 9, neither had any issues.

  • The main reason it's not supported is because it's incredibly complicated. If the connection to the host drops without warning, then the clients may be missing important state information that only the host had, so cannot take over as host. To mitigate that you'd need to continually sync data from the host to other peers so that they can take over if need be, but since this is all game-specific data the multiplayer engine can't handle that for you - you'd have to do an awful lot of events for ongoing synchronisation and then a tricky transition from peer-state to host-state while hoping all the peer reconnections work (and at that point some of them could fail, e.g. if the peer who is becoming host is behind a NAT that only allows them to act as peer and not host, so then nobody can connect and the game fails anyway).

    One way of solving this would be to run the host on a dedicated server instead.

  • Yeah, that sounds about right - almost instantaneous, no lag at all!

  • You should probably just completely ignore the power-of-two sizes thing. It's more likely to cause problems than help anything.

  • Ashley

    I'm just guessing at that number - what do you mulitply the Multiplayer.Latency by to get the exact number of milliseconds?

    Nothing - it's already in milliseconds!

  • Yeah, from r217 onwards you can only use NW.js 0.13+.

  • Have you actually made a measurement or are you guessing it's 500ms? People have guessed wrong before, assuming what is really a ~50ms delay is actually much longer. The multiplayer engine adds a short delay (80ms IIRC) for buffering purposes so maybe you're just seeing that?

  • Even if you occasionally send the position, you're still missing 90% of the multiplayer object's features. It can do things like smoothly correct the position over time so you never see the object jump if a correction is made.

    I'm not sure why two tabs would have such a high latency between them - are both tabs open as their own windows or are you leaving one in the background? If you background a tab, it will basically go to sleep and stop responding to messages, which could explain the ~1s latency. All local testing should be done with both windows open.

    • Post link icon

    — - please provide a minimal repro if you can - see the FAQ for info on how to get there if you can't reproduce in a new project.

  • ome6a1717's method won't work: both the runtime and network latency are non-deterministic, so only sending inputs will cause the games to diverge until both sides are seeing something completely different. Multiplayer programming is exceptionally difficult, you should really use the built-in syncing features, which have carefully tuned redundancy and compensation features that can adaptively handle things like changing average latency and latency variance, high packet loss and packets arriving in the wrong order, while keeping synced object movement smooth and very close to the position on the host. If you think you can just send a few messages and get a similar system, you are severely underestimating the technology behind the Multiplayer plugin.

    If you run two tabs on the same machine, you should easily see <5ms latency between them. A poor quality long distance link from e.g. UK to Australia could be around ~500ms. So if you're seeing 600ms+ on the same machine, that indicates some kind of fault. The latency is 100% to do with the network connection, WebRTC won't add more than a few milliseconds. I did extensive testing of the feature at the time, and even long-distance games worked well with the multiplayer engine's features for compensating poor quality connections.

    • Post link icon

    I can't reproduce this in either the Steam or standalone versions of C2 when previewing with NW.js: it appears to close down just fine, even with Steam open and running in the background. So if I understand right, this only happens when you've published an app to Steam and are running it from Steam, right? Are you sure you have not configured some special command line parameters or launch options that Steam might be applying and breaking it? Perhaps it's related to the Steam overlay, does it help if you disable that? (It's caused some problems in the past before IIRC)

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 27 Oct, 2026

Twitter
Ashley has 1,833,050 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x6
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs