phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.14k stars 7.1k forks source link

windows mobile 8.1 doesn't display game when AUTO used #1706

Closed ramarro123 closed 9 years ago

ramarro123 commented 9 years ago

Hi,

i think that 2.3.0 is still affected by bug #1437

if i use AUTO the game doesn't work, if i use CANVAS the game is displayed as expected.

Should i do browser detection on my side or AUTO should be patched to avoid using webGl when windows mobile 8.1 is used?

i can't really test on windows machine (i use osx) but, using weinre to redirect console of mobile device, i didn't see any error. I can just say that when AUTO is used, the webgl render is picked, and the game is 'black'

i have try the demo on prev ticket (https://dl.dropboxusercontent.com/u/6213850/WebGL/nyanCat/nyan.html)

and this demo work, this point to me that we have a bug on pixi, and i think that phaser need to workaround to this issue by using canvas instead of webgl when AUTO is picked for this device.

i can't open bug on pixi, i don't use the lib directly but only via phaser, thus i can't demonstrate that the bug is pixi specific.

ps: phone is nokia lumia 530, os windows phone 8.1

photonstorm commented 9 years ago

There is a PR here which addresses this issue: https://github.com/photonstorm/phaser/pull/1503 but no-one has tested it for us yet, so we've no idea if it works or not (and hence haven't merged it in)

photonstorm commented 9 years ago

Ok this should now be fixed in the dev branch. Windows Phone automatically swaps to canvas, regardless of what you requested.

spayton commented 9 years ago

I don't think this is the right thing to do, for the following reasons:

  1. If the user purposely selects WEBGL then the library should use this. The client code has every available resource under the sun to determine how well WEBGL is going work prior to instructing the library to use it, this determination shouldn't be fixed in the library.
  2. All selectable rending modes WEBGL/CANVAS/AUTO on my Lumia 920 running Windows Mobile 8.1 are working fine using the dev branch prior to this commit. Whatever the problem encountered was it does not affect all mobile Windows devices.

I'd suggest reverting this modification until it is known what proportion of the windows devices it affects, when a better informed decision can be made.

photonstorm commented 9 years ago

Fair enough, done.