Phaser 3 Game Examples written in TypeScript.
Examples made with ❤︎ by digitsensitive
Framework created by Photonstorm
Phaser 3 and TypeScript
Phaser is a wonderful, fast and free open source HTML5 game framework. Here you will find everything you need to develop games with Phaser 3 in TypeScript. Have fun discovering, developing and playing! Ideas and corrections are highly desirable to constantly improve this repository!
Getting started
Prerequisites
Download and install npm with Node.js @ https://nodejs.org/en
Installing
Select a folder, navigate to it, and clone this repository with this command-line:
git clone https://github.com/digitsensitive/phaser3-typescript.git
Install the dependencies with this command-line:
npm install
Building and Running
Perform a quick build (bundle.js) and start server:
npm run dev
Game Examples
Check the package.json
for the correct scripts to start projects.
For example you can start the Candy Crush
project with:
npm run candy-crush
- Coin Runner
- Alpha Adjust
- Snake
- Blockade
- Asteroid
- Flappy Bird
- Space Invaders
- Super Mario Land
- Candy Crush
If you have any suggestion for a next game example, let me know!
Experimental fun projects
Check the package.json
for the correct scripts to start projects.
For example you can start the Game of Life
project with:
npm run game-of-life
- Game of Life
- Raycasting
- Untextured Raycaster
- Point in Polygon
- Fractal Tree
- Lissajous curve
- Procedural Generation
- Cellular Automaton
Cheat Sheets
Tutorials
External Resources
- Phaser 3 Framework
- Phaser 3 Docs with TypeScript Definition File
- Phaser 3 Online Docs
- Phaser 3 Official Examples
- Phaser 3 Discourse
Helpful tools
TypeScript Configuration
tsconfig.json
The following Compiler Options
have been set in the tsconfig.json
file:
Option | Value |
---|---|
target | ES2016 |
module | CommonJS |
sourceMap | true |
noImplicitAny | true [WIP] |
strict | true [WIP] |
You can see the complete list of the available options at here. Interesting read about setting up a nodejs-project.
Changelog
Learn about the latest improvements
Contributing
Want to correct a bug, contribute some code, or improve the codes? Excellent! Let me know! Please read CONTRIBUTING.md for details on our code of conduct.
I would like to thank the following persons for their support and help: @FakeBarenziah @emedws @evanlanglais @iliyaZelenko
License
This project is licensed under the MIT License - see the LICENSE.md file for details.