Affecting loading progress

For developers using the Construct 2 Javascript SDK

Post » Mon Apr 07, 2014 3:41 pm

How do i affect the loading progress of the game? as in, where and how can i control when the game is ready automatically with my plugin, if it has to perform certain tasks before the layout/game can be started.

I'm aware i can make a flag condition that tells the user when everything is ready, but it would be nice if possible to just do the loading work that i need automatically when the game starts? how and what does the loading progress currently do, and is what i want possible?

would this be for the on create action of my object or someplace else?

i know i saw a this.runtime.waitForImageLoad function somewhere, not sure if this is doing what i want for images, but i need a way to make the runtime wait as something is being preprocessed, so a way to tell it "wait" is imperative and then tell it can start again, or any similar solution.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

Post » Tue Apr 22, 2014 6:58 am

Message: osrgroup is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
With AJAX requests you can monitor the status change and adjust your progress bar (div) accordingly, all you have to do is to decide what percentage to assign to each step.
B
2
Posts: 1
Reputation: 152

Post » Tue Apr 22, 2014 10:44 am

All you can do is use waitForImageLoad. All the loader does is wait for images to be loaded then it starts the game.

If you need something else to be ready, maybe just have an 'On loaded' trigger in your own plugin.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests