Getting Ready to Develop HTML5 Games with Phaser and TypeScript
by Emanuele Feronato
$0+
Have you always thought about starting to develop HTML5 games using Phaser and TypeScript but it seemed too difficult?
Do terms like Node.js, webpack and web server scare you?
This mini-guide will take you by the hand by walking you through the step-by-step setup of your computer so that you can immediately start developing HTML5 games with Phaser, the best framework for HTML5 game development, and TypeScript, the most advanced superset of JavaScript.
From the experience of more than 500 tutorials about Phaser, I am covering these topics:
What is Node.js?
What is npm?
Do I have Node.js and npm installed?
How to install Node.js and npm
What to do once you have Node.js installed
A web page that just won't work locally
What is CORS policy?
What is a web server?
Your first Node.js web server
A web server able to launch a page
A web server able to launch more pages
A web server just working fine
Running a Phaser example locally with Node.js web server
What is Visual Studio Code?
Configure Visual Studio Code to build HTML5 games with Phaser
What is webpack?
How to install webpack
Installing useful webpack plugins
What is live reloading?
Create a webpack configuration file for development
Create a webpack configuration file for distribution
What is TypeScript?
How to install TypeScript
From JavaScript to TypeScript
Moving and distributing your whole project
What is Vite?
Creating a TypeScript Vite project
What is Hot Module Replacement?
The structure of a Vite Project
Adjusting Vite project to work with Phaser
Exporting Phaser Vite project for distribution
What is Terser?
Testing your distributable project
Each and every step is explained in depth with pictures and source code examples, which are also included in a folder.
By the end of this minibook, you will be able to turn your computer into a HTML5 development workstation