Ashley's Recent Forum Activity

  • If you can't connect to anyone else and noone can connect to you, your ISP probably has some crazy carrier-grade NAT that ruins all peer-to-peer connections. It's just the type of thing that happens, largely as a result of IPv4 address exhaustion. Sorry. Complain to your ISP. I don't think it's anything to do with C2 or WebRTC specifically.

  • If you delete the .uistate.xml file and try to reopen, does it work?

  • iOS 7 has better fullscreen support (with minimal-ui), although they ended up removing it in iOS 8 (which you can't get on the iPhone 4, only iPhone 4S+). If you choose not to upgrade then you're also choosing to be left behind from other software support - I'd really recommend you stay up to date. BTW these days you can buy $99 phones unlocked that outperform the iPhone 4 by double or triple... consider upgrading!

  • Don't most people have Aero enabled these days? I think the latest Chrome Canary (v40) has the fix now, but I think it only works with Aero enabled. It measures a lot better on sbperftest here anyway in Canary.

    I just read that Firefox also has "Project Silk", which includes improving v-sync timing reliability, and should eventually make it to all platforms (they're targeting Firefox OS first). So it looks like both Chrome and Firefox are aware of the issue and have improvements in the pipeline.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The host will definitely keep going and running all events. I think triggers can still fire in background tabs, making it possible to respond to network events even while suspended. Perhaps give it a test and see what happens.

  • Can you provide a .capx as per the guidelines? It is almost impossible to do anything about this without one to investigate.

  • What about multiplayer? Will I have to resync the whole state every time the user tabs away?

    No, syncing is transparent and automatic, and there is nothing you can do to affect it anyway, it's all handled by the engine. The host will send all objects at least twice a second regardless of whether they changed. (This uses little bandwidth and is generally not a performance concern, especially compared to changing objects being sent 30 times a second.) If the user tabs away and the game freezes, then they tab back, the peer will get a full-state update from the host within 500ms. It's the same thing that happens for late-joining peers, they'll get the update very soon after joining and everything will appear in its right place. The game freezes but the browser does maintain background connections so the player is not disconnected.

    For hosts it's a different matter and I didn't really want to talk about it because it breaks my own rule Since the host is basically the game server and has the authoritative state, switching tab would freeze the entire game for all connected peers. That basically ends the game; if you have 20 people connected, tough, all 20 people freeze. This is pretty bad and would mean casual gaming where people tend to flip tabs a lot would be prone to regular freezing. To avoid this I implemented a hack - for hosts only - where it keeps the tab alive in the background. Yes, this drains battery faster, but it is basically necessary if the tab is acting as a multiplayer game server, and I don't think it's worth ruining the game for everyone just to save a bit of battery in that case. Also it allows dedicated servers to run multiple hosts in different browser tabs. I think that's a special case and the only reason a tab should be kept alive in the background, so it's deliberately not supported for anything else. For all other purposes you should just compare the time that was spent suspended and play catch-up, and not waste battery.

  • Another developer has identified and reported some v-sync issues in Chrome and Firefox. I've posted in their reports that this may be the issue behind the jank people have identified lately. Here's a list of bugs to follow if you want to track progress on this:

    https://bugzilla.mozilla.org/show_bug.cgi?id=1080869

    https://bugzilla.mozilla.org/show_bug.cgi?id=1028893

    https://code.google.com/p/chromium/issues/detail?id=424563

    https://code.google.com/p/chromium/issues/detail?id=422000

  • Closing as fixed in r186.2.

  • The browser engine effectively pauses the game when you switch tab. You really don't want to work around this. It will unnecessarily drain battery on laptop and mobile devices, and freezing the game allows it to go in to low-power idle states.

    You can easily check how much time has passed if switching away. Just check the wallclocktime expression in 'On suspend' and 'On resume' (Browser object triggers). So even if the game has frozen because the user switched away, you can still tell how much time they spent, *and* you get to save battery because the game properly froze.

  • Closing, we don't officially support CocoonJS any more, please follow up with Ludei.

  • We haven't made any functional changes to the multiplayer plugin - or the server - for ages. Perhaps you accidentally made some change to your project and mistakenly attributed that to a C2 update.

Ashley's avatar

Ashley

Online Now
Early Adopter

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

Twitter
Ashley has 1,835,152 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