White Text goes horrible in new version?

Discussion and feedback on Construct 2

Post » Tue Jul 23, 2013 6:50 pm

I have a blank project and made the layer background light blue.

I then put some text objects on, and changed the font to Verdana(18).

all good.

however, if I now change the font colour to white, and run it, the text comes out like some 8-bit font, totally different to if I change the font to red or black or any other colour (in which case it looks perfect).

Any ideas why white text would go horribly wrong?nutmix2013-07-23 19:11:59
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Tue Jul 23, 2013 11:41 pm

Strangely, that's a product of WebGL. Try turning it off for a moment to see the difference.
B
12
S
5
G
2
Posts: 59
Reputation: 3,859

Post » Wed Jul 24, 2013 10:23 am

Yes, switching off WebGL has fixed it.

Result!
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Wed Jul 24, 2013 10:31 am

You shouldn't use the Text object with WebGL. It's VERY performance heavy, especially on mobile devices. Rather use Sprite Fonts.Xionor2013-07-24 11:41:44
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Wed Jul 24, 2013 11:55 am

@Xionor - the Text object should not be that performance heavy in WebGL mode, providing you don't change the text every tick.

@nutmix - post a .capx and we can investigate why the quality is worse. You shouldn't have to turn off WebGL - it can make your game half as fast or less.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Wed Jul 24, 2013 12:20 pm

@Ashley - On mobile devices, even one-time changes/updates to the Text object induce a small hickup/stutter. Hence why I recommend to avoid it altogether.
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Wed Jul 24, 2013 10:53 pm

@Ashley, here is a project with a couple of text objects in, if you look a the white text, you will see that the B is thicker, and that XT join togehter etc. Its like the white version has gone into 8 bit bold mode. The red version has some anti aliasing issues too, but at least the text looks the same as black. If you switch of webGL, the problem goes away. Looks bad on both FF and Chrome on Windows 7. Looks ok on iphone 4 and ipad 3

https://www.dropbox.com/s/pai6m8so3mua9g9/badtext.capxnutmix2013-07-24 22:57:11
B
17
S
6
G
3
Posts: 370
Reputation: 3,942

Post » Thu Jul 25, 2013 12:00 pm

@nutmix - not sure we can fix that I'm afraid. The way the WebGL renderer draws text, it can't take in to account the background color, since it draws via rendering to a texture, then copying the texture to the display. In canvas2D it draws directly on to the display so it can properly blend with the background. I'm not sure what we could do to fix this or work around it.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Thu Jul 25, 2013 1:47 pm

No problem, as long as you are aware of it. I just disable webGL in all my projects (which are mainly for mobile, which doesnt support it yet).
B
17
S
6
G
3
Posts: 370
Reputation: 3,942


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 31 guests