Lag Problem - on set text

Get help using Construct 2

Post » Tue Mar 04, 2014 5:03 am

I'm making a android app - But I'm having a lag problem. It lags when the score changes, Im using a text field to display the score and the event "Set Text to" to change it. If I remove the set text event it works fine so I think that problem. Any suggestions on how I can fix it.

Thanks!
B
21
S
3
Posts: 67
Reputation: 1,099

Post » Tue Mar 04, 2014 5:23 am

From what I read in the forums 'Text' option shouldn't be used for games. Sprite Font should be used instead.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Tue Mar 04, 2014 7:02 am

No more lag!! Thank You!
B
21
S
3
Posts: 67
Reputation: 1,099

Post » Tue Mar 04, 2014 7:17 am

PhoenixNightly: Why shouldnt Text be used? What are the disadvantages? And when should I use Textobjects?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Tue Mar 04, 2014 7:36 am

Rabenmutter wrote:PhoenixNightly: Why shouldnt Text be used? What are the disadvantages? And when should I use Textobjects?


textbox and Mobile apps have performance issues.

TextBox doesn't work with current wrappers {coocoonjs} and has loads of problems with mobiles in general.

I use spritefont for everything. Even for the PC, cause you never know if you want to port it to mobile later?
Biggest adv is you know what you getting. I create my own spritefont template in photoshop and it has shadows, 3d, whatever I want it to look like.
Photoshop, you can download 100's of free styles (wood, metal, glass etc) Can't do that with css, and even with css3 you can't get same result, besides inserting css into c2 projects is very limited.
Disadv: Obviously it isn't as easy as textbox, well it is, but the default spritefont is horrible lol.

Image below didn't come out all that well. But you don't need to create menu buttons, you can just use spritefont :)
You do not have the required permissions to view the files attached to this post.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Mar 04, 2014 7:50 am

Are we just talking about performance problems with TextBoxes or also with the normal Text Object?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Tue Mar 04, 2014 7:54 am

Also there is a app by blackhornet that helps you take font you are permitted to use for commercial use and change to bitmap here--

sprite-font-generator-v2_t86546?&hilit=GiveYourFontsMono_v2_1.

I can't speak for mobile performance but for my tester project When using the TextObject I did have issues in Firefox and Chrome where they didn't appear at first. The layout had to be restarted for it to show. :/ But no problems with it in IE.
Last edited by PhoenixNightly on Tue Mar 04, 2014 7:59 am, edited 1 time in total.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Tue Mar 04, 2014 7:55 am

Normal text object too.

It just happens. Spritefont is better at this stage in my experience in performance and less issues down the road.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Mar 04, 2014 8:00 am

You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Mar 04, 2014 11:24 am

I've been trying to find a sprite font that is similar to the original, but not so far spaced. Anyone find a good one yet, or is it yet another thing I'll have to do for graphics? lol
B
27
S
7
G
6
Posts: 267
Reputation: 3,850

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests