Getting Started with Phaser 3

Updated: 22nd February 2018 by Richard Davey   @photonstorm

The Phaser 3 release was a huge milestone for us and compacts months and months of hard work into a few hundred kilobytes. There are several ways to get hold of it:

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 min file has the source map and comments stripped out and can be used directly in production.

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.

Download from NPM

Phaser 3 has been published to npm. You can grab it using:

npm install phaser

We include the build files in npm in the dist folder.

Build from the source

You can also build it from source. To do this grab the repo or npm package and then use the commands:

npm update npm run build

This will build a development version to the build folder. This isn't minified and includes a source map (hence the giant size!) so is perfect for debugging. If you'd like to build a dist version instead, do:

npm run dist

There is also a live reloading version available:

npm run watch

If you're going to contribute a pull request back to the repo please use:

npm run lint

To run ESLint across your code, before submitting a PR.

Full instructions on contributing to Phaser are given on this page.

Feedback

We would really like to know what you think of Phaser 3. 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.