Fixed the red mac loading bar for my game.

0 favourites
  • 11 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • My game was obviously way too big to not get the red bar loading error (thousands of animation frames , 246 megs.)

    game in question: https://www.scirra.com/forum/viewtopic.php?f=148&t=163151&p=999204&hilit=eternal+step#p999204

    But with some outside help and fiddling involving changing a few lines in the project file we managed to get a fix that worked for mac on our game.

    Pass us a tell if you would like instructions to try on your game see if it works for everyone else.

  • My game was obviously way too big to not get the red bar loading error (thousands of animation frames , 246 megs.)

    game in question: https://www.scirra.com/forum/viewtopic.php?f=148&t=163151&p=999204&hilit=eternal+step#p999204

    But with some outside help and fiddling involving changing a few lines in the project file we managed to get a fix that worked for mac on our game.

    Pass us a tell if you would like instructions to try on your game see if it works for everyone else.

    Why not just post the fix for anyone?

  • It just feels kind of bad for me to post alterations of the engines code on their forums. Is it OK to do so?

  • You could also pass it on to Ashley and maybe he can fix it, if it's a C2 issue.

  • Yeah, I'd be curious to know what you changed and if we can incorporate it in to an official solution.

  • Well having 0 coding knowledge I can only speculate at best but here's the fix someone got for me:

    in runtime.js after export.

    replace:

    img_.onerror = function (e)

    {

    img_.c2error = true;

    anyImageHadError = true;

    if (console && console.error)

    console.error("Error loading image '" + img_.src + "': ", e);

    };

    if (this.isEjecta)

    with:

    img_.onerror = function (e)

    {

    if(img_.try===3){

    img_.c2error = true;

    anyImageHadError = true;

    if (console && console.error)

    console.error("Error loading image '" + img_.src + "': ", e);

    } else {

    img_.src='';

    if(img_.try===undefined) img_.try=0;

    setTimeout(function(){

    img_.try++;

    img_.src=src_;

    },50);

    }

    };

    if (this.isEjecta)

    (we also had the red loading error on linux and it fixed it there too though people don't seem to get that as often.)

    Not sure if it will the same for everyone else but it worked for us.

  • Awesome, I will try this out and report back.

  • So you just implement up to 3 retries for loading the image?

    Even if that works, it's a classic band-aid solution: the root problem is still there, and there's no reason to think there won't be three or more failures for image loading which will have the same consequence, so it seems dubious...

  • Yeah that's why I wanted to see if it worked for others before saying anything. We have tested a lot after though and never got any fails or errors in game on the Macs we tried.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah that's why I wanted to see if it worked for others before saying anything. We have tested a lot after though and never got any fails or errors in game on the Macs we tried.

    mapmerry I'm interested in this fix you discovered because I have the same issue. I've gotten to where my GPlay game doesn't load, but rather has the red progress loading bar, due to having too many image and audio assets: 771 png images at 34.3mb, and 539 ogg sounds at 23.7mb. But when I applied your fix, it just did this thing where the blue bar goes forward then back again, and loops that way, never actually finishing the loading. Also attempted it with 9 instead of 3, same thing. Have you by any chance discovered an improved version of your fix since last? Thanks

  • in runtime.js after export.

    replace:

    img_.onerror = function (e)

    {

    img_.c2error = true;

    anyImageHadError = true;

    if (console && console.error)

    console.error("Error loading image '" + img_.src + "': ", e);

    };

    if (this.isEjecta)

    with:

    img_.onerror = function (e)

    {

    if(img_.try===3){

    img_.c2error = true;

    anyImageHadError = true;

    if (console && console.error)

    console.error("Error loading image '" + img_.src + "': ", e);

    } else {

    img_.src='';

    if(img_.try===undefined) img_.try=0;

    setTimeout(function(){

    img_.try++;

    img_.src=src_;

    },50);

    }

    };

    if (this.isEjecta)

    Thank you, it work!

    I could play my game on Mac, but today I tried it again and I got the red bar in the loading.

    I'm 99% sure it's because the amount of files, I just overcame the 1000's on "app.nw"

    Note: the file is "c2runtime.js"

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