How do I make a layout preloader?

Get help using Construct 2

Post » Thu Jul 16, 2015 1:14 pm

Hi,

I have around 10 layouts in my mobile game. Every layout is using spritefonts and other objects and therefor I have a delay (around 1-2s, depends on mobile) while switching beetween layouts.

It gives a really bad feeling like the game was really heavy, cause it literally freezes for 1-2s before the next layout appears.

Is there a way to make a preloader which will be shown between switching layouts?
ImageImageImage
B
28
S
17
G
82
Posts: 1,034
Reputation: 45,912

Post » Thu Jul 16, 2015 1:37 pm

I posted an example of a loading screen between levels for someone else here

Hopefully it will help you too.
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 468
Reputation: 6,866

Post » Thu Jul 16, 2015 1:56 pm

Thanks @OddConfection. I figured that out myself too but I was hoping there is smarter and more generic way to do it.

I've tried also On end of layout -> Set layer "loader" Visible, but surprisingly this does not work. Looks like switching layout is triggered before this layer is rendered :(.

I guess the "loading layout" trick is the only way.
Last edited by BackendFreak on Thu Jul 16, 2015 9:47 pm, edited 1 time in total.
ImageImageImage
B
28
S
17
G
82
Posts: 1,034
Reputation: 45,912

Post » Thu Jul 16, 2015 3:16 pm

I haven't made anything with long load times, so I'm not sure how Construct 2 handles it, so does it just show the layout that is ending in a frozen state as the next layout loads?

If so, maybe put the layer "loader" visible under the event that also says to end the layout so it runs that action before the layout ends.
B
11
S
2
G
1
Posts: 79
Reputation: 842

Post » Thu Jul 16, 2015 3:55 pm

I actually face a similar problem in the game we are developing. We have ~20,000 sprites that have to be destroyed and recreated on leaving/entering the main layout, however, when I make them all global objects (to retain their existence in between layouts) the original placement code somehow mucks up their position on returning to the layout.

I have yet to build a mockup showing the problem yet, but I am going to track this thread to see if any clever solutions to fluidly switching layouts comes up.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests