https://github.com/christopherkade/phaser-game-example
Basic Phaser game example
https://github.com/christopherkade/phaser-game-example
Last synced: 8 months ago
JSON representation
Basic Phaser game example
- Host: GitHub
- URL: https://github.com/christopherkade/phaser-game-example
- Owner: christopherkade
- Created: 2017-11-09T16:31:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T18:42:10.000Z (over 8 years ago)
- Last Synced: 2025-03-09T15:56:39.086Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Updated result of the [Making your first Phaser game tutorial](https://phaser.io/tutorials/making-your-first-phaser-game).
- Cleaned up the tutorial's code by splitting it into distinct methods (for example `setUpStars()` which simply creates our star group and its content)
- Added enemies to the game using the 'baddie.png' asset, when a user touches an ennemy, he dies and may restart the game by pressing [Space]
- Added an 'end' to this little game, when all of our stars are collected, the user is congratulated and may restart the game by pressing [Space]
## Run it
You need an HTTP server to run this localy.
```bash
git clone https://github.com/christopherkade/phaser-game-example.git
npm install -g http-server
cd phase-game-example
http-server .
```
Open one of the links displayed by http-server and navigate to `game.html`.
Voilà ! Use the arrow keys to move around & jump.