Phaser + React Bifrost + Vite + TypeScript Stack With ESLint & Prettier
- Latest Phaser 3.x
- Using React Bifrost for the UI
- Prettier + ESLint
- Vite for blazing fast compilation and hot reloading
- Assets generator
- BGM Player (Howler.js)
- Logger (pino & donsole)
- React UI integration (React Bifrost)
- Animated tiles plugin
This template includes three examples for using React Bifrost to build your UI with React.
- Title Realm
- Simple menu with buttons that starts the Phaser game.
- Hud Realm
- Communicates back and forth between React & Phaser to show the HP meter
- Game Over
- Restarts the game
pnpm
pnpm run assets
pnpm dev
! If you use the auto generated assets 👇 !
Everytime you add something to your assets directory, you should run the pnpm run assets
command to generate the auto import file.
yarn dev
yarn build
In this template, I've included the following sprite:
Exported like so
Mark all walls with custom property: collides: true
Embed tileset in map
Since Vite does not support ac3
& m4a
formats, we need to make sure the audiosprite json
is not referencing those files and that they're not included in the bundle.