/brunch-phaser-desktop

A Brunch skeleton for making games with Phaser 3, desktop oriented with Electron

Primary LanguageTypeScriptMIT LicenseMIT

Brunch with Phaser 3 (Electron + TypeScript)

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

🎉 Get started

  • 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 or brunch build --production builds a minified project for production.
  • Make:

    • Write all that concern window handling into process
    • Write all that concern game handling into renderer.
    • Put game assets in assets.
  • 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

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

Phaser is managed through npm. The latest release is installed when you create a new project.

npm view phaser version

Update with:

npm update

Other builds

See the npm.static entry in brunch-config.

👾 Typescript

Phaser 3's definitions are still evolving, and there may be errors.

👀 More

If you don't want to use Electron, or Typescript, please have a look to other brunch + phaser skeleton:

🔧 Configuration