Ashley's Recent Forum Activity

  • - thanks for sending the .capx. It looks like WKWebView mode can spike memory usage while loading. The next build has a mitigation which should help a lot with that.

  • Just a quick update, it turns out NW.js 0.18 had a bug which broke Construct 2 games. It's already been fixed though and apparently there will be an 0.18.1 release tomorrow. Assuming that works, we'll have a NW.js update out then.

    That would also explain why you couldn't get 0.18 to work!

  • As of the latest beta, UIWebView should be working again. So if you have trouble with WKWebView, you should be able to move back to UIWebView and have it work on iOS 10 as of r237. There's also a few more WKWebView fixes in that build. It's unusual for minor iOS releases to make any significant changes, I would initially expect that if it's not working it's not the iOS update that broke it, but who knows.

    The new WKWebView detection code should be working OK, if you change it you'll probably just break things now. In general if you change the runtime script directly without properly understanding what you're doing, you're probably just going to break things and waste time and increase your own frustration.

    Honestly I'm not sure what you want me to say, I'm not telepathic and I can't magically fix the problem because you complained in the forum. WKWebView can sometimes use more memory, so maybe your app is running out of memory. I kind of just have to assume that's what's happening. If you don't provide your .capx or submit a bug report what do you expect me to do? I do test with a few large projects that I've been sent in the past, including source files for Airscape and The Next Penelope, which work fine everywhere I've run them (which is not everywhere, we support loads of platforms and configurations, but the point is I do and can test with large projects). The main problem with these demos though is they're designed for PC, both in specs and user input, so I'm always happy to have different large projects to test with. I do sometimes test very large projects, and it runs out of memory and crashes, and so I have to say sorry, you need to reduce the memory use.

    If you don't think running out of memory is the problem, you can still try to reproduce it: create a new empty project and just jam it full of your game's images/assets/whatever, and see if it breaks sooner than it ought to considering the device's RAM. If it does, now you have an ideal .capx to submit for a bug report. IIRC nobody has done that, for NW.js, for Cordova/WKWebView, etc. Considering it has been very common in the past for people to make games that waste memory and crash the app and then blame Construct 2, I sort of just assume it's that unless you can prove otherwise.

  • It works on all platforms, including mobile.

  • We should have an official installer out shortly for NW.js 0.18. I think updating from the direct download is easy to make a small mistake and break it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • nothing has changed in the performance department on mobile,

    I've written a number of blog posts, with objective measurements, that show it has. I don't think the fact one game that potentially has a performance issue outweighs all of that?

    [quote:7mdwrekc]I feel that Scirra should take over the development of some of cordova plugins directly related to C2 core functionalities

    I agree. Hopefully we will start this soon.

    [quote:7mdwrekc]I feel like there is a big push on your part to make newbie friendly deployment of apps on android and ios, with phonegap build and intel xdk, but when such products produce all kind of errors, there is clearly something wrong, something that might turn to be off-putting for inexperienced users.

    I don't think anyone properly appreciates how many people are successfully publishing Cordova/desktop games with Construct 2. If everything works fine, there's not much reason to post to the forum. If things don't work, people tend to come and post on the forum. I think this creates a distorted perception that these tools are not working at all. For the most part, I think they are working fine. That's not to say nobody has issues with them, there are bugs and issues like with any technology, but I think it's blown out of proportion.

    [quote:7mdwrekc]on ios is a know issue that you need an initial touch to start audio, as outlined by you in a comment

    Yes, that's true, it's a restriction Apple enforce. It only needs one touch though then all audio will play back fine.

    [quote:7mdwrekc]on ios audio is definitely not low latency as it depends on the webview

    As far as I am aware, sample-accurate playback works on iOS, in both webviews - they both support Web Audio.

    [quote:7mdwrekc]it would be much better to interface with something like this: https://github.com/floatinghotpot/cordo ... ativeaudio

    I am baffled as to what to do when on one side, we are criticised for relying too much on third-party code, then on the other side, people are suggesting to solve problems by relying even more on third-party code. And that project appears to be relatively unmaintained (last changed 7 months ago) and has open bugs like sound doesn't play on iOS 10...

    [quote:7mdwrekc]I will be more than happy to provide you with the full capx of Pigs in the Oven it's around 30mb if you are ok with that I will send you a pm with the dropbox link, I will include a list of all the issues that I've been facing with intel xdk.

    Sure, please send it over, I want to take a look and see what is going on. I have PMs disabled on the forum, please email me at ashley@scirra.com.

  • The point of dt is to handle different framerates at the same real-world speed.

    If something already uses seconds instead of frames, e.g. "Wait X seconds", "Every X seconds" etc, then it already works at the same real-world speed, because 1 second is still 1 second regardless of your framerate. So if you add dt it is simply wrong.

    I think asking this question is a sign you don't quite understand what dt is for yet...

  • TBH using crop mode will give you bigger problems - it doesn't do any scaling, so the game will look small on high-resolution devices. If you scale it yourself, you cannot use any fractional scales otherwise you break pixel-perfectness. If you use integer scales, then you've basically reinvented letterbox integer scale mode. Don't try messing with the canvas size or anything, just pick a 16:9 resolution and run the game in fullscreen mode, and it should be pixel perfect and fill the screen on common devices.

    I've actually considered removing crop mode - I think it creates more problems than it solves, especially for games.

  • Just use letterbox integer scale. No other modes can guarantee pixel-perfect display so easily. For example if you choose crop mode on a device with a non-integral devicePixelRatio (and your screenshot looks like it uses some kind of high-DPI display), then the canvas size itself can be fractional.

    (non-integral DPRs are a terrible idea, but they exist, so we have to deal with them...)

  • Our focus since early 2015 has been on Construct 3 development. With respect, there still have been some significant changes if we wind back 3 years and look at what's happened since October 2013:

    • we added tilemap support (!)
    • added a new asm.js powered physics engine (2-3x faster)
    • added Crosswalk support for Android so modern Chromium engine can power games on old Android versions
    • ...then Android 5.0+ added a Chromium-powered webview with WebGL, Web Audio etc. making Crosswalk unnecessary on 5.0+
    • added Wii U support
    • Microsoft released a whole new browser, Edge, which we fully support
    • added Windows UWP app support, including (currently beta) Xbox One support
    • added the entire Multiplayer engine
    • iOS 8 was released with WebGL support which significantly improved performance
    • iOS 9 made JIT-compiled JS code in Cordova a possibility in WKWebView, with further significant performance improvements
    • we deprecated non-browser platforms like Ejecta because they actually had more problems, ranging from memory management bugs to major missing features like Web Audio, form controls, XML parsing etc. etc.
    • started C3 development
    • released all-new Scirra Arcade
    • performance increased significantly across all browsers and platforms
    • WebGL even works on a Raspberry Pi now
    • many NW.js updates
    • new C2 features include low-res fullscreen, better editor high-DPI support, speech synthesis, real-time shadow casting, video support (!), more form controls (including File Chooser), touch gestures, global layers, workflow improvements such as better autocomplete and new asset reimporting tools, new Local Storage plugin, rewritten offline support using Service Workers, canvas video recording, audio scheduling, 'Sort Z order' action
    • more C2 bug fixes and compatibility changes than I could count

    I'm sure I've missed some.

    iOS support is actually now faster than Ejecta ever was. Ejecta was locked in to interpreter-mode-only Javascript execution, but the new JIT in WKWebView compiles JS code, so it should be much faster (and the measurements in our blog posts demonstrate that objectively). That's part of why we dropped support for the non-browser wrappers: not only are they missing loads of features, but by now they're actually slower, contradicting the original reason they exist in the first place. And Cordova supports virtually all of C2's features. So I don't know why your app would have poor performance, or why audio decoding would be slow (always been fast on iOS - Android had a bug that made decoding slow for a while, but it's fast again now). In fact low-latency audio is supported everywhere with Web Audio, including in Microsoft Edge, and the new audio scheduling feature allows sample-accurate playback timing. If you share a minimal .capx demonstrating any issues I could investigate, but so far I believe everything is working much better than you describe!

    4) sounds like a feature request - file a bug and I'll get to it if it's that simple.

    2) is a weak point, I admit - it's really frustrating how quickly the Cordova ecosystem moves and things do break regularly. It can take a lot of time and effort to fix that and balancing that with C3 development is hard. Still I want to do something about this soon to make it better. I should add though, that if you want a definitive list of the Cordova plugins C2 uses, it lists them all automatically in the exported files when you choose the Cordova exporter, in formats suitable for both Phonegap Build and the Intel XDK. Open config.xml and you should see them all listed there. Note it changes depending on the features you use.

  • In the coding world, clear code is always better than clever code. I think the same applies for events: make it clear and easy to understand, rather than using tricks to make it use fewer events. The only circumstance you should break this rule is if you run a profile and measure that those events are causing a significant slowdown, in which case you might want to use clever tricks to speed it up, but that is surprisingly rare.

  • Closing as not a bug: see 'Expecting math calculations to be exact' in Common mis-used events and gotchas.

    The inaccuracy happens in your CPU circuitry and affects all software on your computer. It's the same problem as saying one third times three when you only have 6 digits of accuracy: you end up with 0.333333 * 3 = 0.999999, not 1, except recurring fractions are different in binary (and 0.2 is recurring in this case).

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,776,826 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
  • x5
    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
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs