Jump to content

Weird issue on mobile


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 :




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




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) :




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

Yes, well thank you very much for testing.


That's really annoying when it comes form the hardware, at I higher level I can at least try to tweak the app, but I can't change the hardware of the devices.


Anyway, thanks.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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