Intel Xdk - Extending the splash screen

0 favourites
  • 3 posts
From the Asset Store
A collection of 16 amazing sprite sheet animations for your incredible games
  • HI, I´ve got a 15mb app and it takes a while to load (after it loads, everything runs just fine) but problem is that loading screen stays on for 3s and then, blank screen. Fact is that the loading goes on and on and it seems the app is broken (but it is not).

    Can you PLEASE help me with this?

    Im using a loading screen (everything runs just fine) but it only starts after this blank screen pause.

    I´ve found this piece of code but I don´t know if it is helpful as I cannot write plain code.

    Runtime.prototype.go_loading_finished = function ()

    {

    if (this.overlay_canvas)

    {

    this.canvas.parentNode.removeChild(this.overlay_canvas);

    this.overlay_ctx = null;

    this.overlay_canvas = null;

    }

    this.start_time = Date.now();

    this.last_fps_time = cr.performance_now(); // for counting framerate

    var i, len, t;

    if (this.uses_loader_layout)

    {

    for (i = 0, len = this.types_by_index.length; i < len; i++)

    {

    t = this.types_by_index;

    if (!t.is_family && !t.isOnLoaderLayout && t.plugin.is_world)

    {

    t.onCreate();

    cr.seal(t);

    }

    }

    }

    else

    this.isloading = false;

    for (i = 0, len = this.layouts_by_index.length; i < len; i++)

    {

    this.layouts_by_index.createGlobalNonWorlds();

    }

    if (this.fullscreen_mode >= 2)

    {

    var orig_aspect = this.original_width / this.original_height;

    var cur_aspect = this.width / this.height;

    if ((this.fullscreen_mode !== 2 && cur_aspect > orig_aspect) || (this.fullscreen_mode === 2 && cur_aspect < orig_aspect))

    this.aspect_scale = this.height / this.original_height;

    else

    this.aspect_scale = this.width / this.original_width;

    }

    if (this.first_layout)

    this.layouts[this.first_layout].startRunning();

    else

    this.layouts_by_index[0].startRunning();

    ;

    if (!this.uses_loader_layout)

    {

    this.loadingprogress = 1;

    this.trigger(cr.system_object.prototype.cnds.OnLoadFinished, null);

    }

    if (navigator["splashscreen"] && navigator["splashscreen"]["hide"])

    navigator["splashscreen"]["hide"]();

    for (i = 0, len = this.types_by_index.length; i < len; i++)

    {

    t = this.types_by_index;

    if (t.onAppBegin)

    t.onAppBegin();

    }

    this.tick(false);

    if (this.isDirectCanvas)

    AppMobi["webview"]["execute"]("onGameReady();");

    };

    var raf = window["requestAnimationFrame"] ||

    window["mozRequestAnimationFrame"] ||

    window["webkitRequestAnimationFrame"] ||

    window["msRequestAnimationFrame"] ||

    window["oRequestAnimationFrame"];

  • Hi Scofano, Have you put too many js files in the <head></head>? It will delay the first rendered frame.

    Suggest put only necessary js files (Used for loading page) in <head>, and a loading page as first page, load remaining js files in the background.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Scofano, Have you put too many js files in the <head></head>? It will delay the first rendered frame.

    Suggest put only necessary js files (Used for loading page) in <head>, and a loading page as first page, load remaining js files in the background.

    guangzhen I think Im using only necessary ones. I'm only exporting the project as android and doing no further editing. I think the size of the project is the point but I can't shrink it anymore.

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