A Brunch skeleton for making desktop games with Phaser 3, Electron and TypeScript. (Why Brunch?)
brunch new <project> -s delni/brunch-phaser-desktop
You don't want to build a desktop game but you want to keep the brunch + phaser stack ? See you in the 👀 More section
-
Install (if you don't have them):
-
Run:
brunch new <project> -s delni/brunch-phaser-desktop
npm start
watches the project with continuous rebuild.npm build
orbrunch build --production
builds a minified project for production.
-
Make:
-
Does it work with yarn ?
Yes it does ! However, you may encounter an npm warn lifecycle due to yarn using another node bin. It should not be an issue while those two node bins are compatible (eg. use the same features)
Electron is used to bundle your game in a desktop application. It allows binding to system api (like notification, status bar, ...).
When creating a production-ready app, please have a look to electron-builder which is highly customizable
Phaser is managed through npm. The latest release is installed when you create a new project.
npm view phaser version
Update with:
npm update
See the npm.static
entry in brunch-config.
Phaser 3's definitions are still evolving, and there may be errors.
If you don't want to use Electron, or Typescript, please have a look to other brunch + phaser skeleton: