Skip to content

Phaser 3 Webpack 5 setup and TypeScript boilerplate. ๐Ÿš€

Notifications You must be signed in to change notification settings

sebsowter/phaser-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Phaser 3 Webpack 5 Boilerplate

Get up and running with Phaser 3 using TypeScript or JavaScript ES6.

This Webpack setup takes care of your code bundling and local development server.

Included are some handy demonstration files:

  • Inputs class for handling gamepad and keyboard inputs
  • Player class demonstrating character movement and state management
  • A basic tilemap created using Tiled

View the demo

Mario

Installation

Ensure you have Node.js installed.

Clone this repository and cd to project directory.

npm i

Tasks

Run the development server

npm start

Preview locally at http://localhost:8080/.

Create a production build

npm run build

This bundles your files to the distribution (/dist) folder. The webpack config is set up to output Phaser and your game code into separate .js files.

If you are publishing your game to itch.io simply zip up the files in the /dist folder and upload the zip file.

Community

This repository is actively maintained. Every so often I upgrade the packages and add features. I like boilerplates to be light so I have kept it minimal. But if you think this package would benefit from additional features then feel free to reach out or add an issue.

About

Phaser 3 Webpack 5 setup and TypeScript boilerplate. ๐Ÿš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published