https://github.com/boechat107/yaptt
Yet another Phaser 3 Typescript Template
https://github.com/boechat107/yaptt
phaser3 template typescript
Last synced: 2 months ago
JSON representation
Yet another Phaser 3 Typescript Template
- Host: GitHub
- URL: https://github.com/boechat107/yaptt
- Owner: boechat107
- Created: 2018-12-02T11:15:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T12:47:10.000Z (over 6 years ago)
- Last Synced: 2025-01-21T13:25:52.836Z (4 months ago)
- Topics: phaser3, template, typescript
- Language: JavaScript
- Size: 650 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phaser 3 - Typescript - Example
This is just another template for Game development using
[Phaser 3](https://phaser.io/) and Typescript. Heavily inspired by
[wtravO's template](https://github.com/wtravO/phaser3-typescript-template).## Build and run
1. `npm install`
2. `npm run build:dev`
3. `npm start`
4. Go to `localhost:8080`To build for production environments (JS minification), use `npm run build:prd`.
PS.: Tested with Nodejs v10.x
## How does it work?
* Webpack is used to build a "bundle" and this project has different
configurations for development and production environments (check the file
*webpack.dev.js*).* *tsconfig.json* is the configuration used by the Typescript compiler.
* *package.json* is a Nodejs configuration, where project dependencies and
script commands (like those in [Build and run](#build-and-run)) are defined.
*package-lock.json* is generated automatically and describes the dependency
tree of all installed packages.* *index-dev.html* defines a simple web page where the game is going to run in
development mode.* *src/* folder contains the actual game code. In addition, a type definition
file for Phaser, *phaser.d.ts*, was downloaded from
[phaser3-docs](https://github.com/photonstorm/phaser3-docs)
(commit [47da5dea](https://github.com/photonstorm/phaser3-docs/commit/47da5dea99737a95932c73873758afd6e9e01b08)).* *phaser_game_config.json* is a general configuration file to set any game
parameters. A special compiler option needs to be set to import JSON files
like it is done here.