Making Your First Game: Part 1
The initial setup for a Phaser project, featuring the basic Game configuration and an empty Scene template.
800 × 600
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);