yuigoto / phaser2-webpack

A boilerplate for games using Phaser CE with TypeScript and Webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phaser2-webpack

Boilerplate for games using Phaser CE and Webpack 5.

⚠️ DISCLAIMER

The 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


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 (or yarn dev) to start the local development server with hot reloading;
  • npm run build (or yarn build) to build the project for production;
  • npm run serve (or yarn 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

About

A boilerplate for games using Phaser CE with TypeScript and Webpack.

License:MIT License


Languages

Language:TypeScript 70.9%Language:JavaScript 19.9%Language:SCSS 6.9%Language:HTML 2.2%Language:Shell 0.2%