This is a starter kit for any Phaser game. It contains the basics you will need to work with Phaser effectively.
Yeah, the boring command line stuff. First clone this repo:
git clone https://github.com/WilliamRClark/phaser-ts-starter/
To get started you'll first want to bring in Phaser, and the rest of the JavaScript dependant files for your project. This can be easily done from the command line using NodeJS:
npm install
The next thing we want to do is to compile the source code. There are several ways to do this.
Most editors (Atom, Sublime, or VisualStudio Code) will compile on save.
Another alternative is to run the command line compile:
npm run tsc
Once the source is compiled, start the webserver.
npm start
Open the folder with your favorite editor. You should get autocompletion, and compile on save.
TypeScript has many features that make larger JavaScript projects faster to develop. Let's be honest. Aren't you tired of typing object.prototype? How about real class definitions for a change.