A back-end template package for Phaser.js and other html game frameworks
This template provides a development environment written in Typescript for Phaser games (or any html based library) by utilizing a few common node modules like Socket.IO, TypeOrm, and Http. It works by running an http server with bound websocket and rendering files to the browser that are used to run the game. Although you can use Javascript, Typescript makes development cleaner and easier in a variety of way:
- Smart Completions
- Scalability
- Readability
Getting started:
- Install node.js
- Clone the repository and open the folder in your IDE
- Install the required dependencies and devDependencies with
npm install
. (dependencies are found in the package.json file) - Run the following commands:
npm run devServer
: Runs the development server on localhost and automatically restarts the server when file changes are detected. It also initializes a connection to a sqlite database configured with 'ormconfig.json'.npm run bundle
: Runs webpack to create a browser-ready Javascript file and automatically re-bundles when file changes are detected.
- Go to the 'game' folder and start coding!
Later updates may include:
- Added functionality
- Production-ready environment
- Better documentation