How do I Optimize spritefont on mobile?

Get help using Construct 2

Post » Thu Jul 24, 2014 1:00 pm

Are you sure you are not "generating" the text every tick ?
It's not clear from your explanation, but do you set the text content in a "On start of layout" event or any kind of triggered event of the like ?

Otherwise you are generating a 900X3000 texture every tick and wondering why it is eating CPU.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,295
Reputation: 70,795

Post » Thu Jul 24, 2014 1:09 pm

@Kyatric Nope, definitely not :)
It's just a single spritefont box with text on it, no code whatsoever. Try it out if you have an ipad. If not, I can provide video evidence and fingerprints of perpetrators (that last part made no sense, still a serious issue though :) )
Thanks for the help anyway
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Thu Jul 24, 2014 1:29 pm

damjancd wrote: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.

Maybe try crosswalk or ejecta? I can't try it now, but i try that sprite font problem in chrome and have 60fps, if crosswalk is like chrome it's gonna be the solution for you.
Last edited by Sisyphus on Thu Jul 24, 2014 1:42 pm, edited 1 time in total.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 1:35 pm

Kyatric wrote:Are you sure you are not "generating" the text every tick ?
It's not clear from your explanation, but do you set the text content in a "On start of layout" event or any kind of triggered event of the like ?

Otherwise you are generating a 900X3000 texture every tick and wondering why it is eating CPU.

I make an example capx, event sheet is empty, works with 60fps everywhere except cocoonjs, after cocoonjs export or in cocoonjs launcher it gives 45fps.
example.capx
You do not have the required permissions to view the files attached to this post.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 2:28 pm

@Sisyphus , What device are you using on CocoonJS? Thanks for the example btw :)
I'm going to attempt using Ejecta or Intel XKD since they have no Intro Logo like Ludei, and maybe they have their shit fixed with spritefonts, but I'm afraid I might be a bit dumb for the whole procedure. Is it complicated?

I've already published one game on appstore via CocoonJS, and that took a moderate amount of time to handle :)
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Thu Jul 24, 2014 2:39 pm

damjancd wrote:@Sisyphus , What device are you using on CocoonJS? Thanks for the example btw :)
I'm going to attempt using Ejecta or Intel XKD since they have no Intro Logo like Ludei, and maybe they have their shit fixed with spritefonts, but I'm afraid I might be a bit dumb for the whole procedure. Is it complicated?

I've already published one game on appstore via CocoonJS, and that took a moderate amount of time to handle :)

I can't try ejecta or crosswalk right now, and never tried them at all, but in tutorials it looks even more easier than cjs export.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Thu Jul 24, 2014 2:50 pm

If that's the case, then GREAT :) I'm setting up Xcode 6 now to try it out :) Will report with findings.
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Thu Jul 24, 2014 3:20 pm

damjancd wrote:If that's the case, then GREAT :) I'm setting up Xcode 6 now to try it out :) Will report with findings.

Yeah, please post here if the crosswalk and ejecta doesn't have the spritefont problem, that's annoying me too.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Fri Jul 25, 2014 5:48 am

Unfortunately Ejecta is running awful on spritefont too. In a similar if not same fashion. :(

I can't try Intel XKD since my computer is not strong enough.. uoooh...
The installer says that.

I'm going to report this as a bug I guess
B
37
S
6
G
1
Posts: 301
Reputation: 2,865

Post » Fri Jul 25, 2014 9:58 am

damjancd wrote:Unfortunately Ejecta is running awful on spritefont too. In a similar if not same fashion. :(

I can't try Intel XKD since my computer is not strong enough.. uoooh...
The installer says that.

I'm going to report this as a bug I guess

Wow, i really thought that ejecta will solve the problem, that's so disappointing.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], dop2000, Kin, Yahoo [Bot] and 31 guests