R213 problem with minifing scripts and running in Chrome

0 favourites
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Same issue for me. Just leave this here to get notifyed when its updated

    win 8.1 latest construct. Blackscreen in chrome.

  • Had the same problem with 213, would not minify, then when I exported a game update to the scirra arcade, it only worked in Edge(ie), I had Java 8 update 60, win 10 64bit, I had to revert back to 212.2, to get it all working again.

  • I change the function in the index.js file

    to C2AudioInstance.prototype.getDuration = function ()

    {

    switch (this.myapi) {

    case API_HTML5:

    if (typeof this.instanceObject.duration !== "undefined")

    return this.instanceObject.duration;

    else

    return 0;

    this should do it

    it did it for me

    Good luck

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We reverted to r200 and the game is working FINE on iOS! Absolutely no audio issues (yet) and no black screen either, and scripts minify fine. Would suggest if you don't have any dependencies on later Construct versions (like the new Local Storage or whatever else has been added), then you should be fine to revert...

    It's probably not recommended to do so but you can change your project's version number by saving your project as files (not as single CAPX file). Open the .caproj in Notepad and near the top find:

    <saved-with-version>VERSION NUMBER</saved-with-version>

    and replace the number with your desired version number followed by two zeros.

  • As I wrote before, You can try that:

    - go to generated/exported not-minified project folder and find c2runtime.js file

    - find function that starts like: C2AudioInstance.prototype.getDuration = function (applyPlaybackRate)

    - change

    let ret = 0;

    to

    var ret = 0;

    For me, that worked , and as You saw - yes, it's because of Audio update <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> ( as expected from update post - https://www.scirra.com/construct2/releases/r213 ... ;p trololololo )

    You can also downgrade C2 to 211.2, here all works, but you also need project with that version.

    (If you are wonder, audio duration function was rebuild from R211 to R213 and disposed from multiple "return" instructions for one instead.)

    The other two errors:

    Uncaught ReferenceError: cr_createRuntime is not defined

    Uncaught ReferenceError: cr_sizeCanvas is not defined

    are caused by the first one, so they will gone after modification that I wrote above.

    Hey thanks for the fix. I was getting a blank screen in XDK and I tried to debug the code in ForeFox. But it didnt occur to me to change LET to VAR <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Now atleast I see the loading screen on the Intel XDK Emulator. I think there is still some issue, the progress bar wont move past 25-30%. Its stuck!

    I wonder if I can install the previous version Copy the Audio Plugin folder. Then reinstall R213 and replace the files from R212.2?

    I think that should work , rather that miss the other important fixes in this version <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    What do you say?

  • Here is my quick fix!

    Download and replace the Audio plugin I uploaded. Worked 100% for me.

  • Same problem here, cant minify and blackscreen on Andriod and Ios devices.

  • Same problem here, cant minify and blackscreen on Andriod and Ios devices.

    Hey try my fix, it worked for me and I was able to update my game to Google Store

  • Ok, I got the solution.

    find the {your path}\Construct 2\exporters\html5\plugins\audio\runtime.js

    line:1946

    change:

    let ret = 0;

    to:

    var ret = 0;

    then you can minify, and no blackscreen.

  • Should be fixed in r214.

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