Making Your First Game: Part 1

The initial setup for a Phaser project, featuring the basic Game configuration and an empty Scene template.

Making Your First Game: Part 1, running
800 × 600
GitHub
class Example extends Phaser.Scene
{
    preload ()
    {
        this.load.setBaseURL('https://cdn.phaserfiles.com/v410');
    }

    create ()
    {
    }

    update ()
    {
    }
}

const config = {
    scale: { mode: Phaser.Scale.FIT },
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    scene: Example
};

const game = new Phaser.Game(config);

More in Firstgame10 examples