phaser2-webpack
Boilerplate for games using Phaser CE and Webpack 5.
⚠️ DISCLAIMERThe images and sounds in this project come from my Ludum Dare 42/LOWREZJAM 2018 game, found here. As such, I own the rights to them and they are not free to use. If you want to use this project as a base for your own game, please replace/remove the images and sounds with your own.
Requirements
- Node.js (v16.13 or higher)
How To
Clone or fork this repository, run npm install
(or yarn
) to install all
dependencies. After that, run any of these commands:
npm run dev
(oryarn dev
) to start the local development server with hot reloading;npm run build
(oryarn build
) to build the project for production;npm run serve
(oryarn serve
) to serve the production build locally;
Project Structure
The project structure might look a little bit strange and wonky, but that's what worked best for me. The important thing to point is on the diagram below:
- public/
- index.html
- favicon.ico
- preview.png
- src/
- assets/ <------------ Contains all asset files, loaded by '/game/assets'
- audio/
- data/
- fonts/
- img/
- scss/
- core/
- constants/
- entities/
- interfaces/
- types/
- utils/
- game/
- assets/ <---------- Contains all game asset objects loading from `/assets`
- atlas/
- audio/
- image/
- sound/
- spritesheet/
- tilemap/
- config/
- scenes/
- index.ts
- info.json <---------- Contains game information, used by `/game/config`
- main.ts
Authors
See AUTHORS.md
for more information.
License
This project is licensed under the MIT License
. See the LICENSE.md
file for details.
©2021-2022 Fabio Y. Goto