Jump to content

Som browers run games but not the ones made with Phaser


plicatibu
 Share

Recommended Posts

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

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

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 browsers

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

I forgot to mention. Sorry.

 

It's Phaser v1.1.2

I 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

 Share

  • Recently Browsing   0 members

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