Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Phaser

Fast, free HTML5 game framework for building 2D games for desktop and mobile.

Game developmentNPM

GitHubWebsite

1. License

License from npm.

github.com/phaserjs/phaser

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Phaser does

Phaser is a web-first, 2D-only game framework that ships AI agent skills in its own repository, including one written to port Phaser 3 games to Phaser 4's rewritten WebGL renderer.

Phaser popularity

71 / 100
Gid Score, #351 overall
778K
downloads a week, npm
40.8K
GitHub stars
12
agent projects use it
Phaser: downloads per weeknpm, phaser 778,231
Phaser: GitHub starsphaserjs/phaser 40,777

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Phaser is used

  • Phaser is a dependency in 12 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 603 projects, and what it is used with below comes from all of them.
  • Projects that use it most often also use Vite (45.6%), webpack (24.4%), webpack CLI (20.9%).

By coding agent

7 projects, 0.2%
5 projects, 0.2%

Often used with

In 45.6% of its projects
In 24.4% of its projects
In 20.9% of its projects
In 18.9% of its projects
In 17.2% of its projects
In 60.9% of its projects
In 16.1% of its projects
In 15.6% of its projects

Phaser in practice

Strengths

Agent skills ship in the repo

The repository has a <code>skills/</code> folder for coding agents. The README says it covers scenes, physics, input, animations, tilemaps, tweens, particles, cameras and more. A separate v3-to-v4 migration skill is meant to guide an agent through porting an old game.

The 8 MB file is mostly comments

The README says <code>phaser.js</code> is over 8 MB because of inline JSDoc. The full minified build, <code>phaser.min.js</code>, is listed at 345 KB gzipped, and <code>phaser-arcade.min.js</code> at 313 KB. The README says build settings can exclude features to shrink it further.

SpriteGPULayer for huge sprite counts

Phaser 4 adds <code>SpriteGPULayer</code>. The maintainers say it handles "a million or more" sprites, "up to 100x faster" than standard rendering. Each member can animate position, rotation, scale, alpha, tint and frame on the GPU.

TilemapGPULayer cost is per pixel

<code>TilemapGPULayer</code> draws a whole tilemap layer as a single quad. The README says it can show up to 4096 x 4096 tiles with no penalty for tile count, and that texture filtering has no seams across tile boundaries.

Watch out for

2D only

The getting-started tutorial says Phaser is a 2D framework. It says 3D needs third-party libraries, and that the documentation and examples reflect 2D.

You need a local web server

The tutorial says you cannot simply drag the HTML file into a browser. Files opened that way use <code>file://</code>, which it calls "massively restricted". A game has to load images, audio and JSON.

Native and Steam builds are third-party

The README says iOS, Android, Steam and native apps are reached "using 3rd party tools". Phaser itself builds for the browser.

Scaffold a new Phaser game

npm create @phaserjs/game@latest
npx @phaserjs/create-game@latest
yarn create @phaserjs/game
pnpm create @phaserjs/game@latest
bun create @phaserjs/game@latest

More about Phaser

Funding
  • Patreon: https://patreon.com/photonstorm
  • Own page: https://phaser.io/community/donate

See all

Agent Skills for it
  • phaser-arcade-physics: Phaser 4 Arcade Physics movement and collision: bodies, velocity, gravity, colliders vs overlaps, groups and bullet pools. Use for a Phaser

See all

Packages around it
  • webpack: Bundler
  • webpack-cli: webpack command line
  • webpack-dev-server: webpack dev server
  • vite: Bundler and dev server
  • html-webpack-plugin: HTML output for webpack
  • @babel: JavaScript compiler
More in Game development

Alternatives

Phaser This page

MITGid 71778K/wk

Compare Phaser with another tool

Get started

Install it.

npm install phaser

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Phaser
- Install with `npm install phaser` and import with `import Phaser from 'phaser';`. In TypeScript, add `"typeRoots": ["./node_modules/phaser/types"]` and `"types": ["Phaser"]` to `tsconfig.json` if the editor does not detect the definitions.
- For new projects, scaffold with `npm create @phaserjs/game@latest`. For first-time users, the docs recommend the options Web Bundler and then Vite.
- When porting Phaser 3 code, use the `v3-to-v4-migration` skill and the Migration Guide. Do not use the removed classes `Point`, `Mesh` and `BitmapMask`. FX and Masks are now Filters.
- In v4, enable lighting with `sprite.setLighting(true)` and set tint behaviour with `setTintMode()`.
- Serve the game over `http://` from a local web server during development. Do not open the HTML via `file://`.
- Keep features 2D. Phaser has no built-in 3D rendering or 3D physics.
- For very large sprite counts use `SpriteGPULayer`. For large tilemaps use `TilemapGPULayer`.