How do I Optimize spritefont on mobile?

Get help using Construct 2

Post » Thu Jul 24, 2014 8:32 am

I use a spritefont.png which is 256x256, but load like 1500 or even 1000 words in it, and on the first gen ipad mini it totally drops to 2 FPS

This is a clean project, I have NOTHING else.
Any ideas how to optimise? Can I somehow turn off collision checks? Is it up to CoocoonJS to fix it? Any tips?
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Post » Thu Jul 24, 2014 9:12 am

Even just 270 words on one spritefont object causes -30 FPS. I think that CocoonJS loads ALL the sprites, visible or not. Damn it. This would've solved so much for the project I'm working on.
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Post » Thu Jul 24, 2014 10:18 am

I hope i get you right, you got a 1500 words of text(sprite font) in your project? Is it static or you change it through events? Yeah, and spritefont not check for collisions.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 11:03 am

completely static, completely new blank project. It just stays there and it syphons precious CPU :)
It drains a lot even on 200 words loaded in it. Does it not do that on your export? And I'm using the default spritefont sheet, not some fancy big other one.
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Post » Thu Jul 24, 2014 11:44 am

damjancd wrote:completely static, completely new blank project. It just stays there and it syphons precious CPU :)
It drains a lot even on 200 words loaded in it. Does it not do that on your export? And I'm using the default spritefont sheet, not some fancy big other one.

Can you please show me your capx? I think i had the same problem, i just use one sprite where all giant static texts typed, i can't found a better way to fix this.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 11:49 am

It's really just a new project, with a spritefont, and random text added to it, that is 900 px wide, and 3000 px high.. nothing else. If you still want, sure I can make it again and upload it. :)
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Post » Thu Jul 24, 2014 11:50 am

@Sisyphus Could you trace your steps so I know what you've tried?

I tried changing almost every function separately, to see if magically it works. That didn't help.
I tried disabling webgl, NO.
I tried lowering text quantity (FPS increased, but just by a little. still 200+ words lag awfully)
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Post » Thu Jul 24, 2014 11:52 am

damjancd wrote:It's really just a new project, with a spritefont, and random text added to it, that is 900 px wide, and 3000 px high.. nothing else. If you still want, sure I can make it again and upload it. :)

Oh, i just want to be sure that i understand you right, my english is not perfect, but now i think that i got it right :D
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 12:36 pm

damjancd wrote:@Sisyphus Could you trace your steps so I know what you've tried?

I tried changing almost every function separately, to see if magically it works. That didn't help.
I tried disabling webgl, NO.
I tried lowering text quantity (FPS increased, but just by a little. still 200+ words lag awfully)

Well, i didn't do anything, i just replace all spritefonts to a sprites with text's when noticed the fps lowering :)

UPD: I just try to open a project with 2 sprite fonts with random text 1000x3000 in mobile browser, and fps is still 60! In cocoonjs launcher i have only 15fps with that project. So i think it's a problem in cocoonjs, try to report it to ludei.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 12:50 pm

Ludei have never replied to anything I've written... I don't think they will on such a seemingly marginal problem. Damn it. I was rather hoping that it's a problem on my device only.

Although I bet that spritefont can be maybe tweaked for CocoonJS to delete what is no on screen, so it doesn't drain resources.

Spritefont would've worked so perfectly for me project... damn.
B
39
S
6
G
1
Posts: 306
Reputation: 2,948

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests