samme / phaser-rollup

Phaser 3 game template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phaser 3 with Rollup 🗞

Getting started

Clone or download this repository and install its dependencies:

git clone https://github.com/samme/phaser-rollup.git my-phaser-game
# OR
npx degit "samme/phaser-rollup" my-phaser-game

cd my-phaser-game
npm install
npm run dev
  • npm run build builds the application to public/bundle.js, along with a sourcemap file for debugging.
  • npm start launches a server, using serve.
  • npm run watch will continually rebuild the application as your source files change.
  • npm run dev will run npm start and npm run watch in parallel.

Phaser

Set build constants in replace() in rollup.config.js.

Copy and modify node_modules/phaser/src/phaser.js, then alias phaser in rollup.config.js:

alias({
  entries: {
    phaser: 'src/phaser-custom.js'
  }
})

TODO

License

MIT.

About

Phaser 3 game template

License:MIT License


Languages

Language:JavaScript 86.6%Language:HTML 13.4%