Jump to content

The game does not run on some android devices (force Phaser.CANVAS)


Vivern
 Share

Recommended Posts

super(Global.WIDTH, Global.HEIGHT, Phaser.CANVAS, 'content', null);

 

On some  android devices, game does not start.

To successfully run the game - need to force select Phaser.CANVAS.

 

 

How best to verify in this case?

 

The following code does not work, because must first create a Phaser.Game:

var renderer;if (this.game.device.android && !this.game.device.webGL) {       renderer = Phaser.CANVAS;} else {       renderer = Phaser.AUTO;}super(Global.WIDTH, Global.HEIGHT, renderer, 'content', null);

or

var game;if(!game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create })) {   //force Phaser.CANVAS for some android devices   game = new Phaser.Game(800, 600, Phaser.CANVAS, 'content', { preload: this.preload, create: this.create })}
 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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