plicatibu Posted November 19, 2013 Share Posted November 19, 2013 Suppose the game is supposed to run on mobile devices not as a packaged application (by cocoon / phonegap or whatever) but as a regular web application accessed through web browser. What's the best approach? To start game using either Phaser.AUTO or Phaser.CANVAS flag? I know when I use flag Phaser.AUTO the game is supposed to use canvas when webgl is not available but for some reason some browsers (for instance, stock browser from Sony Ericson Xperia X8 - Android 2.1-update1) doesn't show any game made with Phaser (I tested samples and the games from the list of games made with Phaser). But I know for sure that this browser is able to run HTML games because I run same games from internet without any problem. May you have experienced these kind of problems? I mean, a browser don't be able to run a game made with Phaser but run other games? I'm wondering whether the browser may be informing incorrectly that supports webgl but in really it doesn't. Regards. Link to comment Share on other sites More sharing options...
haden Posted November 19, 2013 Share Posted November 19, 2013 What version of Phaser are you using ? Link to comment Share on other sites More sharing options...
plicatibu Posted November 19, 2013 Author Share Posted November 19, 2013 I forgot to mention. Sorry. It's Phaser v1.1.2 Link to comment Share on other sites More sharing options...
rich Posted November 20, 2013 Share Posted November 20, 2013 Android 2.1 is really old and doesn't support loading assets via the xhr method we used in early versions of Phaser, I think it was around 1.1.2 we updated to support that version, but even then it's easy to do something that the stock Android browser doesn't like. Rather than test old games I would just focus on seeing what you can get to run based on the latest version and checking for errors. Simple stuff like loading just 1 image, maybe some of the examples. Link to comment Share on other sites More sharing options...
spencerTL Posted November 20, 2013 Share Posted November 20, 2013 A small gotcha that I encountered across browsers that was hard to track down was when cropping sprite widths. The error reported was no help, at least to me. this.barSprite.crop.width=1; //works on all tested browsersthis.fuelDisplay.crop.width=0; //Chokes some browsers including IE10 so quite possibly older ones too. No prob on Chrome, Firefox, iPad Safari... I mention this one here just as it was not easy to find and particular to a small set of browsers. Link to comment Share on other sites More sharing options...
haden Posted November 20, 2013 Share Posted November 20, 2013 I forgot to mention. Sorry. It's Phaser v1.1.2I had s similar problem, basically the browser doesn't support WebGL but Phaser for some reason tries to use it, even with the AUTO flag. It got resolved when I switched to the dev branch. Could you try the dev branch and see if it's working. Link to comment Share on other sites More sharing options...
plicatibu Posted November 20, 2013 Author Share Posted November 20, 2013 Thank you all. Today I am enjoying a day off but tomorrow I will give a try in the dev branch and I will report the result here. Link to comment Share on other sites More sharing options...
Recommended Posts