auto-reduce sharpness when FPS are low

Get help using Construct 2

Post » Fri Oct 25, 2013 7:36 am

Hi everyone,

I made an HD app with the resolution of 1200x1920.

I have three test devices:

Samsung Galaxy S2 (480x800)
Galaxy Nexus (1280x720)
Nexus 10 (2560x1600)

So my problem is that I get horrible FPS in cocoonjs on the Galaxy Nexus (~15). It's doing best on the S2 with almost 60FPS all the time. The Nexus 10 has around 35-55 FPS.

So I guess the S2 has less to do because it down-scales what needs to be drawn. I dont wanna reduce my resolution because it looks really good on the nexus 10 and 35-55 FPS are ok.

I was woundering if there is a way to reduce (within the running app) the resolution and upscale it up again so it fits the whole screen.

Something like this:

If FPS <= 35 set layout-size from 1200x1920 to 600x960 and set scale rate to 2.0

So at the end the whole task will just reduce the sharpness if there is not enough cpu-power.

Does anyone have an idea if or how this could work?


B
34
S
9
G
3
Posts: 206
Reputation: 7,851

Post » Fri Oct 25, 2013 8:14 am

Have you tried using the debug layout feature in construct2 to see what it is that is using up most of you cpu?

The layout size can't be changed at runtime and it actually wouldn't have any effect I think. If your graphics are the issue causing the framedrop your focus should be on reducing the size of them.

If your background is made up of one picture, at 1200x1920 it's at least using 9MB of memory and if it's placed in a power of two texture (I don't know if cocoonjs still does that for every texture) even 16MB.

But Graphics are not the only thing capable of reducing framerate, so finding out what is should be your first concern.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Oct 25, 2013 4:35 pm

Hey LittleStain,

yes, I checked it in the debugger but everything looks fine there. A total cpu usage of just 7%.

All my images are optimised. I only have those pictures big that are neeeded to look good on tablets.

My total downlaod size is around 2MB and memory usage is around 45MB.

I would reduce the size of the layout and the images to like 600x960 but I don't get why this app is running so well on my old galaxy s2.


It's the same app but the resolution is lower (1200x1920 layout on a 480x800 screen). So that's why I guess that the canvas size counts over layout/image size.

Do you have any explaination for that? I want to be sure about that before I start reducing everything.


B
34
S
9
G
3
Posts: 206
Reputation: 7,851


Return to How do I....?

Who is online

Users browsing this forum: amazingdream and 24 guests