phaserjs/examples

Phaser 3 Examples

JavaScript

1,666

3,424 commits

updated Aug 24, 2026

See the code

README

Phaser 4 Examples

All of the code in this repo can be browsed at https://labs.phaser.io. The labs site is a mirror of this repo and changes made in the repo are synced to the site within minutes.

You can also clone this repo to have the code locally for testing, which can be really useful while developing with Phaser 4.

Dev Version vs. Release Version

By default the examples site is configured to serve the latest dev version of Phaser 4. We are continuously working on it, which means new builds are pushed often several times per day. Use the drop-down menu below the example to run it against any previous release version. You should see the URL change to reflect the version within it.

Requirements

If you want to run our scripts then you need Node.js installed.

To show the example browser run these commands in your terminal:

CommandDescription
npm installInstall dependencies and launch browser with examples.
npm startLaunch browser to show the examples.
Press Ctrl + c to kill http-server process.
npm run updateTo build a new examples.json file if you add a new example.

Alternatively, if you have your own local web server installed, you could configure it to serve the /public folder from the repo and you will get access to the examples interface.

License

The source code in this repo is released under the MIT license.

The assets are not.

Lots of the assets in this repo come from old classic arcade / computer games or open and stock art sites. As such, you cannot use them in your own commercial games, or for any games that carry advertising.

phaserjs/examples

Phaser 3 Examples

JavaScript

1,666

3,424 commits

updated Aug 24, 2026

See the code

README

Phaser 4 Examples

All of the code in this repo can be browsed at https://labs.phaser.io. The labs site is a mirror of this repo and changes made in the repo are synced to the site within minutes.

You can also clone this repo to have the code locally for testing, which can be really useful while developing with Phaser 4.

Dev Version vs. Release Version

By default the examples site is configured to serve the latest dev version of Phaser 4. We are continuously working on it, which means new builds are pushed often several times per day. Use the drop-down menu below the example to run it against any previous release version. You should see the URL change to reflect the version within it.

Requirements

If you want to run our scripts then you need Node.js installed.

To show the example browser run these commands in your terminal:

CommandDescription
npm installInstall dependencies and launch browser with examples.
npm startLaunch browser to show the examples.
Press Ctrl + c to kill http-server process.
npm run updateTo build a new examples.json file if you add a new example.

Alternatively, if you have your own local web server installed, you could configure it to serve the /public folder from the repo and you will get access to the examples interface.

License

The source code in this repo is released under the MIT license.

The assets are not.

Lots of the assets in this repo come from old classic arcade / computer games or open and stock art sites. As such, you cannot use them in your own commercial games, or for any games that carry advertising.

Significant stargazers

nikolas

207 followers · starred Feb 2021

Ali Karbassi

181 followers · starred Feb 2022

Sihan Chen

23 followers · starred Nov 2019

Louis Vignier

69 followers · starred Nov 2018