Intel Xdk - Extending the splash screen

Ideas and discussion about publishing and distributing your games

Post » Fri Aug 29, 2014 12:12 am

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[i];
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[i].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[i];
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"];
B
34
S
5
G
1
Posts: 164
Reputation: 2,725

Post » Fri Aug 29, 2014 5:02 am

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.
B
2
Posts: 9
Reputation: 168

Post » Fri Aug 29, 2014 10:50 am

guangzhen wrote: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.
B
34
S
5
G
1
Posts: 164
Reputation: 2,725


Return to Distribution and Publishing

Who is online

Users browsing this forum: No registered users and 0 guests