Phaser Examples
This is the Phaser Examples repository. If you're looking for the framework itself, please go here: https://github.com/photonstorm/phaser
Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses Pixi.js internally for fast 2D Canvas and WebGL rendering. This repository is specifically for all of the Examples we produce to go with it.
Learn By Example
Phaser comes with an ever growing suite of Examples. Personally we feel that you learn better by looking at small refined code examples. So we created over 250 of them, and create new ones to test nearly every feature added to Phaser. Inside this examples
repo you'll find the current set. If you write a particularly good example then please send it to us.
The examples need to be run through a local web server (in order to avoid file access permission errors from your browser). You can use your own web server, or start the included web server using grunt.
Using a locally installed web server browse to the examples folder:
examples/index.html
Alternatively in order to start the included web server, after you've cloned the repo, run npm install
to install all dependencies, then grunt connect
to start a local server. After running this command you should be able to access your local webserver at http://127.0.0.1:8001
. Then browse to the examples folder: http://127.0.0.1:8001/examples/index.html
There is a 'Side View' example viewer as well as the default. This loads all the examples into a left-hand frame for faster navigation.
You can also browse all Phaser Examples online.
Contributing
-
If you find a bug in an example then please report it on GitHub Issues or our Support Forum.
-
You can issue Pull Requests for new examples or fixes to existing ones against the
master
branch. -
If you have a feature request, or have written a game or demo that shows Phaser in use, then please get in touch. We'd love to hear from you! Either post to our forum or email: rich@photonstorm.com
Bugs?
Please add them to the Issue Tracker with as much info as possible, especially source code demonstrating the issue.
About Phaser
Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses Pixi.js internally for fast 2D Canvas and WebGL rendering.
By Richard Davey, Photon Storm
- View the Official Website
- Follow on Twitter
- Join the Forum
- Source code for 300+ Phaser Examples or browse them online
- View the growing list of Phaser Plugins
- Read the documentation online
- Join our #phaserio IRC channel on freenode
- Subscribe to the Phaser Newsletter and we'll email you when new versions are released.
License
Phaser and all examples are released under the MIT License. This does not include any assets (art, music, sounds)