A project template for Phaser web games.
-
Gulp task manager, to handle development and distribution tasks.
-
BrowserSync development server, for cross-device testing.
-
EditorConfig support, for consistent editor configuration between collaborators — check if EditorConfig support is available for your code editor.
-
JSHint for code quality check.
-
Bower for easy component management.
-
Babel to translate from ES6 to ES5 syntax. See which language features are currently supported.
-
Handlebars templates, LESS style sheets, support for source maps output, off-line cache and much more!
Download and extract the packaged project contents, or clone this repository locally. Either way, the following npm scripts are available to you, performing the tasks described below.
npm install # Installs all required project dependencies.
npm start # Launch a development server. Same as `gulp dev`.
npm run dist # Prepare the game release for distribution. Also `gulp dist`.
npm run clean # Delete temporary and distribution build files.
Also, you may want to install Gulp and Bower globally, but you are not required to do so.
Happy coding!
To see a more elaborate sample game in action, extract the sample-game.zip
file, included in this repository, from the project root. The only extra
dependency is localForage, so you'll need to run bower install
to run
the game without errors.
Wanna try something different? slush-phaser-plus
is an automated project
generator based on this template. Check the project page for more
details, or just install it with npm (npm install --global slush-phaser-plus
)
and give it a shot!
(Meanwhile, development of this template will continue regularly.)
All source code distributed under the terms of the MIT License.
This project is based upon earlier efforts by these two brilliant developers:
- slush-phaser-node, by Matt Gale (@Eruant), and
- slush-phaser-project, by Sean Bohan (@pixelpicosean).
Some code borrowed from gulp-starter, by Daniel Tello.