TrinityCore Posted May 18, 2018 Share Posted May 18, 2018 Hi Guys! I have a problem when i create a new "Phaser.Game". The problem is that when i run the game, this is using other dimension that i haven't spesified in the code. ¿any solution? The code is very simple: this.PhaserGame = new Phaser.Game(1200, 650, Phaser.AUTO, "canvas", null, false, true, Phaser.Physics.ARCADE); Thanks to all for your time. Quote Link to comment Share on other sites More sharing options...
SeelenGeier Posted June 12, 2018 Share Posted June 12, 2018 Let me guess, your canvas is 1024x768? That is the default for Phaser if you just call "new Phaser.Game()". The headline says v3.8 but you are not using any gameConfig to initialize the game but the way it was in Phaser 2. In Phaser 3 you initialize the game with a config object instead of parameters. try this: var config = { type: Phaser.AUTO, width: 1200, height: 650 }; var game = new Phaser.Game(config); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.