Slowdown with effects on mobile

Discussion and feedback on Construct 2

Post » Mon Aug 04, 2014 9:11 pm

Hi guys,

I'm using a radial warp effect on a layer on each one of my layouts. As I switch between the layouts on my mobile device (using cocoonjs) the layer effect gets slower and slower.

Is there some form of memory management I am meant to do when leaving each layer? i.e. am I just queuing up layouts into memory?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Mon Aug 04, 2014 10:52 pm

TheWyrm wrote:effects [...] mobile

There's your problem.

On a more serious note, did you try isolating the problem? Make a minimal capx with as few things as possible, but with the problem still ocurring, and we might be able to help you better.

I'm sorry I can't be of more help, my experience with mobile and with wrappers is pretty limited.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Tue Aug 05, 2014 2:46 am

To elaborate some effects on Mobile are very costly. Also if it's getting slower and slower per layout change is it possible that you also might be stacking the effect too?
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Tue Aug 05, 2014 5:47 am

@jayderyu How would one stack the effect? As far as I was aware when you go to a new layout everything associated with that layout is gone. Is this not the case?

Yeah, I am aware that effects are costly on mobile devices. However, I have created a dynamic performance sheet based on FPS. So those who run modern devices can benefit from the sexier effects. Those who run older devices don't suffer. Well that's the theory anyway...
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Tue Aug 05, 2014 3:16 pm

@TheWyrm
True. Everythign should be cleared and maybe it is. However if your progressivly getting slower then you have a leak. Turn off the effect and see if the game continues to get slower per layout change.

Also Effects are shaders in the GPU try making sure the effect is disabled between on layout swaps.I'm not 100% saying this s the problem. I offering possibilities based on what little contextual information provided. Try them if that's not the problem then time to look elsewhere.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Tue Aug 05, 2014 4:30 pm

I've used webgl effects on layers and have not ran into this progressive loss of performance when switching layout, sounds like you have some code that is causing it.

Most effects are unusable on mobiles due to the performance hit, even top of the line devices lose half their performance, its just not worth it currently.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Sun Aug 10, 2014 4:47 pm

Thanks guys. So I setup the game to turn off all effects and then turn them back on every time a new layout started, but the problem was still there.

@Silverforce Yeah, I came to this conclusions as well. I was only using the effect for a cool looking underwater effect on the GUI. So I reasoned that it isn't worth including until its improved. The only issue I can foresee with my code is I check the FPS and then turn off effects if it gets low and vice versa when it is high. So perhaps I am turning the effect on extra layers. Still this wouldn't explain how it gets progressively worse.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542


Return to Construct 2 General

Who is online

Users browsing this forum: kanjmarrie and 4 guests