Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Weird issue on mobile


Zaidar
 Share

Recommended Posts

Hi everyone,

 

I have a Nexus 4 with Chrome v31.

 

I use in my game this code :

function create(){  game.stage.backgroundColor = '#87ab63';}

It works fine on my desktop, but when I access it with ny nexus, I have this result :

 

post-5366-0-36902100-1386768222_thumb.pn

 

The backgroundColor doesn't apply. Same issue on this url : http://gametest.mobi/phaser/examples/_site/view_full.html?d=input&f=multi+touch.js&t=multi%20touch

 

post-5366-0-15226500-1386768230_thumb.pn

 

To debug this, I randomly tried to add a border and then the backgroundColor was displayed on my mobile, as shown in this screenshot :

 

(I add red background to debug afterwards) :

 

post-5366-0-28047300-1386768235_thumb.pn

 

So what do you think about that ? Is it a problem  somewhere else in my code (not really big just begun) ?

 

Can you replicate the issue ?

 

Thanks for any answer, cheers,

 

PS : sry if I was quick, but I closed my tabs so I had to rewrote the post :(

 

PS2 : going to bed as it is late here (melbourne), so I'll try to keep up with your answer

 

PS3: sry for attachements, the forum doesnt accept png from imageshack apparently (to not use too much storage space)

Link to comment
Share on other sites

Many thanks for the testing.

There surely is a way to use a background color but I will need to use my own "canvas background coding" instead of the game.stage.

I don't have time time to make more testing today, but as Phaser use Pixi.js and just seems to use getter and setter to determine background color, I think it may be a pixi.js rendering issue, but I may be totally wrong.

Link to comment
Share on other sites

I know a can create background color by creating a box with the width and height of the canvas, but PIXI seems to me like a big black box. Is there a way to change the way PIXI render the canvas background without  having an error every line ?

Link to comment
Share on other sites

I everyone, I continue with my spam, apparently this is an issue as you can see on this link : https://code.google.com/p/chromium/issues/detail?id=324404

 

So basically, 

<canvas width="800" height="600" style="background-color: rgba(0,0,0,0)"></canvas>

Doesnt work on nexus 4 and 5 at least.
 

My solution would be instead of giving the properties to the canvas, giving it to the parent (like the width, height, and background) to make it looks like it's the canvas.

Link to comment
Share on other sites

just tried it on the 2012 Nexus 7 (Tegra chipset) and it works fine. as all the devices we've tried and in that bug report are qualcomm adreno GPUs, I'm guessing it's an issue with the adreno subsystem in chrome/android

 

just part of the joys of supporting a multitude of devices :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...