How do I do smooth layout changes? (currently it freezes)

Get help using Construct 2

Post » Thu Feb 04, 2016 8:37 pm

Is there a way to have smooth layout changes with loading on non-web platform (Android app, IOS app, etc...)?
Currently, I have a image that says "Loading", but I can't animate it because during animation it freezes to load the next layout.
Check out my games on Google Play:

BEAST ATTACK (900,000+ downloads!)

ZOMBIE BASH (Android) (Launched Feb 17)

ZOMBIE BASH (iOS) (Launched March 17)
B
49
S
15
G
2
Posts: 427
Reputation: 5,139

Post » Thu Feb 04, 2016 10:02 pm

What about something like a fade to black (color) effect:

Image

Example: .capx
Ba-dum Tsss!
B
11
S
2
G
1
Posts: 45
Reputation: 757

Post » Fri Feb 05, 2016 1:59 am

@NicotineLL Thanks so much for your the help! However, that still won't work because although it will animate the overlay, the game will still freeze when going to layout 2. The only reason why this example looks smooth is because the example is very lightweight. When you have many more lines of code and more sprites, changing to another layout takes about 2.5-3 seconds.
Check out my games on Google Play:

BEAST ATTACK (900,000+ downloads!)

ZOMBIE BASH (Android) (Launched Feb 17)

ZOMBIE BASH (iOS) (Launched March 17)
B
49
S
15
G
2
Posts: 427
Reputation: 5,139

Post » Fri Feb 05, 2016 2:53 am

I don't think anything can be done about it currently. An extreme solution would be to have only on layout and impliment your own loading. Then you could make it load over multiple frames instead in one frame. Still I think the main thing that affects the loading time is loading the graphics of that layout into VRAM.
B
89
S
30
G
95
Posts: 5,154
Reputation: 63,444

Post » Fri Feb 05, 2016 9:26 am

Have you tested it though? I tried replicating a heavy load, but it still changed smoothly.

If executed right the overlay opacity would happen before we even call the second layout (from 0% to 100%) and after we loaded the second layout (from 100% to 0%). That would mean that the freeze would happen in between, when the overlay is at 100% opacity.
Ba-dum Tsss!
B
11
S
2
G
1
Posts: 45
Reputation: 757


Return to How do I....?

Who is online

Users browsing this forum: ankas, mekonbekon and 16 guests