Jump to content

Som browers run games but not the ones made with Phaser


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.



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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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