Getting Started with Phaser 3

Updated: 27th September 2017 by Richard Davey   @photonstorm

The Phaser 3 Betas are a huge milestone for us and compacts months and months of hard work into a few hundred kilobytes. I would love it if you could help us test it out. There are several ways to get hold of the V3 beta:

GitHub Release

Go to the GitHub Releases page and download the latest build files. There is a phaser.js file and phaser.min.js. The phaser.js is a development build and includes a source map inside of it (hence the massive file size!), which is perfect for giving you accurate runtime errors. The min file has the source map and comments stripped out and is more like what a production build of Phaser 3 would be.

Webpack Project Template

We created a sample project template for you. This uses Webpack to build and is a quick and easy way to get started. Use the following to get the template:

npm install phaser3-project-template

Once it has downloaded go into the folder and issue the command: npm run build and it will build the sample project. Open the index.html file into a browser to see the end result. You can modify the source in the src/index.js file to play around with it, or just use this template as a basis for your own. We will expand it over time to add in features like Live Reload.

Download from NPM

Phaser 3 Beta has been published to npm. You can grab it using the following tag:

npm install phaser@beta

Due to the way the package publishes you'll need to do the following:

cd node_modules\phaser npm update npm run build

The build files are generated in the dist folder.

We're aware this isn't an ideal situation, but it's a restriction of a package publishing from a sub-folder. When v3 is released properly you won't need to do this.

Build from the source

The final and best way to get the Beta is to download the Phaser repo and build it locally. This gives you the most flexibility and allows you to view the Phaser source easily but takes a little more effort.

Full instructions are given on this page.

As an update to those instructions you can perform a build of the dev version now by issuing the command npm run build or you can build a distribution version with the command npm run dist which will create minified compressed builds.

Beta Feedback

We would really like to know what you think of v3. I appreciate that because we haven't started the documentation yet it's going to be hard going for you, but there are hundreds of examples to inspect and learn from and things aren't that different to v2.

We need both bug reports and your feedback on the API. Of course, we want to squish as many bugs as possible, so bug reports are really important for us. But we also want to get your feelings on the API changes too, so if you think a method name doesn't make sense, or you have a suggestion for a feature or property then please let us know! There are lots of ways:

GitHub Issues

This is our preferred method of receiving bug reports and suggestions. Please open a new Issue on GitHub and throw in as much detail as you can. Source code snippets are even better.

Phaser 3 Forum

There is a new Phaser 3 Forum running on HTML5 Game Devs. You can attach files or embed source code and it's a good place to get discussion from other devs too. We are monitoring this forum daily.

Email

Old school, but it works. You can email rdavey@gmail.com. Please understand I cannot enter into long support style discussions via email (there just aren't enough hours in the day!) but I'm happy to take v3 feedback here.

Phaser Slack

You can also talk to me on the Phaser Slack channel. Just use @rich and I'll get the message when I'm not online (if I'm not there at the time).

Whichever method you use, please do use one! All comments are useful, even if it's just to let us know that something works, that's good too. Bugs are best suited to GitHub Issues as you will then know when we fix them because the issue will be linked to a commit but if you'd rather not register on there we'll happily take them via any other means listed.