Scaffold out a game supported by Phaser3.
- ES6 support via Babel
- Webpack that includes hot-reloading for development and production-ready builds.
Node.js is required to install dependencies and run scripts via npm
.
This directory contains any static code which isn't available through NPM, such as custom build of Phaser or CSS files.
This directory contains audios, spritesheets, XMLs, fonts, etc.
Note: There is scanner for resources in this starter. You can get url of one resource like this:
import res from 'res'
const url = res.url('image.btn-play')
src/scenes/
- store scenes, per file per scene.src/plugins/
- store plugins.src/objects/
- store entities.src/components/
- a collection of UI elements for displaying information or interact with the players.src/util/
— helpers.
Command | Description |
---|---|
npm install |
Install project dependencies |
npm start |
Build project and open web server running project |
npm run build |
Builds code bundle with production settings (minification, uglification, etc..) |
Just like writing general JavaScript project with Webpack.
Put the contents of the dist
folder in a public location.