This is a simple implementation of the Asteroids videogame using Phaser.
Branch | Build | Coverage |
---|---|---|
main |
- Each time you hit an asteroid, it breaks down into smaller and faster pieces. Try not to be hit!
- The game is over when you have no more lives or if you destroy all the asteroids.
- Your highest score is saved on your browser localStorage.
- Leverage TypeScript's type system as much as possible. 🚀
- Building and running the videogame through webpack
- Learning how to make a Phaser videogame testable (this is the hard part! 😅)
- Automated testing through Headless Chrome, Karma, Mocha and Chai 🤘
2. Install dependencies (optionally you can install yarn)
Run npm install
or yarn install
Run npm run dev
or yarn run dev
This will run a server so you can run the game in a browser. It will also start a watch process, so you can change the source and the process will recompile and refresh the browser automatically. To run the game, open your browser and enter http://localhost:8080/ into the address bar. If you want to change the port, please edit the webpack.config.js file.
Run npm run test
or yarn run test
This will launch the Karma test runner which uses the Headless Chrome browser.