Text Z Order problem [Chrome]

Bugs will be moved here once resolved.

Post » Sun Apr 01, 2012 8:48 pm

Hey

I made a text object at layer 0, layer 1 have some sprites.

when the sprites move to the text, the text object is above then, should be below.

In Internet Explorer 9 it's showing correctly it's Z order position.

Also the Text object at the same layer as the sprite object, if I put it behind the sprite and run the preview it appear above the sprite too.

Tested only in IE9 and Chrome (latest version)

Using C2 R84 64bit.


EDIT: WebGL disabled with Chrome the problem doesn't appear, the text Z order is correct. Maybe something related to my video card? Can some1 try that with Chrome and webgl enabled with a dedicated video card and see if this problem persist?Guif0DA2012-04-01 20:51:04
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sun Apr 01, 2012 10:44 pm

I also have this problem with text not going anywhere but top of everything. It's also Firefox too that does it also.
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Sun Apr 01, 2012 11:04 pm

This is not a bug, it's by design. See the manual entry for Text:

[quote]Note if WebGL is enabled in project properties, due to technical limitations all Text objects appear on top of everything else in the game. For example, Sprites cannot be displayed on top of Text objects when WebGL is on, because the text is rendered to an overlay above the game. It is recommended to design your game so it is not necessary for other objects to appear on top of text objects, since turning off WebGL can reduce performance.[/quote]

IE9 does not support WebGL, which is why it Z orders as you expect.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Apr 02, 2012 12:07 am

[QUOTE=Ashley] This is not a bug, it's by design. See the manual entry for Text:

[quote]Note if WebGL is enabled in project properties, due to technical limitations all Text objects appear on top of everything else in the game. For example, Sprites cannot be displayed on top of Text objects when WebGL is on, because the text is rendered to an overlay above the game. It is recommended to design your game so it is not necessary for other objects to appear on top of text objects, since turning off WebGL can reduce performance.[/quote]

IE9 does not support WebGL, which is why it Z orders as you expect.[/QUOTE]

but how could this be a design choice?
I turn on webGL because it make the game faster but then I can't make the game like I want because there will be texts everywhere above things I don't want to be..
This technical limitation if from the browsers or C2 itself?
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Mon Apr 02, 2012 2:16 pm

WebGL does not render text, so to have text, Ashley is forced to display them in an other DOM element on top of the canvas.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Apr 02, 2012 2:49 pm

@Kyatric is right, WebGL does not actually have the ability to draw text. So we work around this by having text layered on top of the WebGL canvas.

You can work around it if you put your text in Sprites or use the Sprite Font plugin - any way you can make your text appear without using the Text object should work.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Apr 03, 2012 12:12 am

[QUOTE=Ashley] @Kyatric is right, WebGL does not actually have the ability to draw text. So we work around this by having text layered on top of the WebGL canvas.

You can work around it if you put your text in Sprites or use the Sprite Font plugin - any way you can make your text appear without using the Text object should work.[/QUOTE] Ya i have thinked about that.. maybe add them to sprites.. also I could add some nice effects to them..

Thanks by the way ;)
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Tue Apr 17, 2012 3:36 am

This can actually be achieved with R0J0hound's Canvas plugin, by pasting a Text object onto a Canvas, at which point you can then utilize other effects, opacities, etc.

If needed, you can also clear the canvas and rewrite text object, should any texts need changing.

Here's a quick demonstration: DEMO

Here's the capx:logo-fade-swipe.capx
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Post » Tue Apr 17, 2012 4:48 am

[QUOTE=Ugotsta] This can actually be achieved with R0J0hound's Canvas plugin, by pasting a Text object onto a Canvas, at which point you can then utilize other effects, opacities, etc.

If needed, you can also clear the canvas and rewrite text object, should any texts need changing.

Here's a quick demonstration: DEMO

Here's the capx:logo-fade-swipe.capx[/QUOTE] Nice demo! ill take a look at the plugin, thanks for the tip ;)
B
30
S
6
G
5
Posts: 433
Reputation: 6,061


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest