Ashley's Forum Posts

  • Aurel - it's working correctly. What's happening is:

    1. Layer has effect so is rendering to its own texture

    2. Layer texture starts out transparent black (0,0,0,0)

    3. Additive blended object renders on top of transparent black. This (AFAIK) correctly fills in the alpha, so you end up with opaque black.

    4. Mode7 effect processes on the layer texture, which correctly distorts the black text.

    To fix it you can try setting the layer with the mode7 effect also to 'additive' blend. It will process the mode7 effect, then additively blend the result on to the background (since blend modes come last). This only works if everything on that layer has additive blend, but that's a good idea anyway since it improves rendering performance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Will it be fixed? Who knows. "It's out of my hands. Stop blowing up my inbox" says Ashley, lead developer of C2.

    Uhh, how about "it's already fixed in Chrome Canary and Mozilla are working on it too"?

  • OK, well, if you're creating/destroying 100 objects per tick then the CPU overhead of the create/destroy actions comes in to play. These need to do things like update object instance lists, families, containers, initialise the default state, initialise behaviors and so on. Most people don't create hundreds of objects per tick so it's not a significant overhead, but in this case it is measurable. I still don't think it's anything to do with garbage collection. The engine still recycles objects when it creates them, but creating an object just involves more work than re-positioning it. So in this specific kind of use case (you're basically recreating particle effects with sprites) repositioning is cheaper, but this does not prove garbage collection has any involvement at all.

  • Do you have triggers to handle all errors as well and display them if any occur? Otherwise how do you know if anything is going wrong?

  • The events in your screenshots make no sense. When the hi-scores are received, you just request the hi-scores again, so it will loop around and around constantly making more requests. Google Play might even have temporarily banned you for making too many requests.

  • Absolutely not worth the engineering effort. Non-browser engines like Ejecta are a compatibility nightmare, and a bit over a month since release iOS 8 is already over 50% install base. iOS 8 would probably have a vast-majority install base by the time we could get something like this working reasonably, making the whole project pointless. Also once Cordova updates to WKWebView its performance will far exceed that of Ejecta due to JIT.

  • I would probably not blame GC for any of the issues here. The engine is pretty good at recycling stuff. I mean it even recycles entire object instances. So even if you are constantly creating and destroying objects, it's actually internally recycling previously destroyed instances instead of allocating new ones. So you don't need to reproduce that in events. The rest of the engine has a similar approach of "recycle it all", so regardless of the content of your events, allocations and garbage creation should be minimal. Perhaps it is something else. Real demos with objective measurements are the best way to investigate it.

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

  • 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