Text Z Order problem [Chrome]

0 favourites
  • 9 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • 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?

  • I also have this problem with text not going anywhere but top of everything. It's also Firefox too that does it also.

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

    ote 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.

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

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

    ote 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.

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

    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?

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.Ya i have thinked about that.. maybe add them to sprites.. also I could add some nice effects to them..

    Thanks by the way ;)

  • 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

  • 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.capxNice demo! ill take a look at the plugin, thanks for the tip ;)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)