Phaser
Phaser examples
phaserjs/examples is the official pile of isolated Phaser scenes. Each example shows one thing: a body, a key, a tilemap, a camera. Use it when you know JavaScript and you want Phaser’s real API, not a full game.

Who it is for
- JavaScript developers making a first browser game
- People comparing Phaser to Godot for 2D web
- Beginners who prefer small files over a course RPG
What you can learn
- Arcade or Matter physics in one file
- Cursors, pointers, and cameras
- Tilemap loading the Phaser way
Clone and run
- Clone phaserjs/examples and follow the repo’s npm start (or open the hosted examples if the README points there).
- Pick one scene in the list. Change a number, refresh.
- Copy the pattern into a Vite template when you are ready to ship.
These files are MIT. They are not a product. Pair this repo with the official Vite + TypeScript template when you want a build step.
Public repositories. The short descriptions are written for this site.
Editorial notes reviewed 2026-10-05.
Related source
Phaser Snake
Classic snake on Phaser, commented for a first read.

Monster Wants Candy
Short HTML5 arcade game on an older Phaser release.
Simon clone
Memory sequence game with comments on the Phaser setup.

I Spy A Ghost
Browser multiplayer experiment using Phaser and WebRTC.

Phaser Vite + TypeScript
Official starter: Vite, TypeScript, and a blank Phaser scene.

Phaser 3 project template
Photon Storm’s minimal Phaser 3 project layout.