{
 "kind": "tool",
 "slug": "phaser",
 "path": "tools/phaser/",
 "name": "Phaser",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Game development",
   "tools/game-dev/"
  ]
 ],
 "lead": "Fast, free HTML5 game framework for building 2D games for desktop and mobile.",
 "chips": [
  {
   "label": "Game development",
   "path": "tools/game-dev/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install phaser"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/phaserjs/phaser"
  },
  {
   "label": "Website",
   "href": "https://phaser.io"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/phaserjs/phaser"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Aug 21, 2026",
   "note": "Latest GitHub release Jul 9, 2026. ",
   "src": "https://github.com/phaserjs/phaser"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "12 projects",
   "status": "info",
   "sub": "#1 of 8 in its category",
   "note": "Dependency in 12 public GitHub projects set up for AI coding agents that we scanned (0.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "1 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Phaser does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Phaser popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "71",
       "of": "/ 100",
       "l": "Gid Score, #351 overall"
      },
      {
       "n": "778K",
       "l": "downloads a week, npm"
      },
      {
       "n": "40.8K",
       "l": "GitHub stars"
      },
      {
       "n": "12",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Phaser is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "7 projects, 0.2%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "5 projects, 0.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 45.6% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      },
      {
       "l": "In 24.4% of its projects",
       "v": "webpack",
       "path": "tools/webpack/"
      },
      {
       "l": "In 20.9% of its projects",
       "v": "webpack CLI",
       "path": "tools/webpack-cli/"
      },
      {
       "l": "In 18.9% of its projects",
       "v": "webpack-dev-server",
       "path": "tools/webpack-dev-server/"
      },
      {
       "l": "In 17.2% of its projects",
       "v": "html-webpack-plugin",
       "path": "tools/html-webpack-plugin/"
      },
      {
       "l": "In 60.9% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 16.1% of its projects",
       "v": "Babel (JavaScript)",
       "path": "tools/babel-npm/"
      },
      {
       "l": "In 15.6% of its projects",
       "v": "Babel Loader",
       "path": "tools/babel-loader/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Phaser in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Agent skills ship in the repo",
       "v": "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."
      },
      {
       "l": "The 8 MB file is mostly comments",
       "v": "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."
      },
      {
       "l": "SpriteGPULayer for huge sprite counts",
       "v": "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."
      },
      {
       "l": "TilemapGPULayer cost is per pixel",
       "v": "<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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "2D only",
       "v": "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."
      },
      {
       "l": "You need a local web server",
       "v": "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."
      },
      {
       "l": "Native and Steam builds are third-party",
       "v": "The README says iOS, Android, Steam and native apps are reached \"using 3rd party tools\". Phaser itself builds for the browser."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Scaffold a new Phaser game"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Bash",
       "code": "npm create @phaserjs/game@latest\nnpx @phaserjs/create-game@latest\nyarn create @phaserjs/game\npnpm create @phaserjs/game@latest\nbun create @phaserjs/game@latest"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Phaser",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Patreon: https://patreon.com/photonstorm",
        "Own page: https://phaser.io/community/donate"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "phaser-arcade-physics: Phaser 4 Arcade Physics movement and collision: bodies, velocity, gravity, colliders vs overlaps, groups and bullet pools. Use for a Phaser"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "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"
       ]
      },
      {
       "title": "More in Game development",
       "path": "tools/game-dev/",
       "items": [
        {
         "text": "Pygame",
         "path": "tools/pygame/"
        },
        {
         "text": "Matter.js",
         "path": "tools/matter-js/"
        },
        {
         "text": "chess.js",
         "path": "tools/chess-js/"
        },
        {
         "text": "phaser3-rex-plugins",
         "path": "tools/phaser3-rex-plugins/"
        },
        {
         "text": "Colyseus",
         "path": "tools/colyseus/"
        },
        {
         "text": "pyglet",
         "path": "tools/pyglet/"
        },
        {
         "text": "PyBullet",
         "path": "tools/pybullet/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Phaser",
       "me": true,
       "facts": [
        "MIT",
        "Gid 71",
        "778K/wk"
       ]
      }
     ],
     "more": "Compare Phaser with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install phaser"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Phaser\n- 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.\n- For new projects, scaffold with `npm create @phaserjs/game@latest`. For first-time users, the docs recommend the options Web Bundler and then Vite.\n- 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.\n- In v4, enable lighting with `sprite.setLighting(true)` and set tint behaviour with `setTintMode()`.\n- Serve the game over `http://` from a local web server during development. Do not open the HTML via `file://`.\n- Keep features 2D. Phaser has no built-in 3D rendering or 3D physics.\n- For very large sprite counts use `SpriteGPULayer`. For large tilemaps use `TilemapGPULayer`.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm phaser"
  ],
  [
   "Category",
   "Game development"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v4.2.1, July 9, 2026"
  ],
  [
   "On GitHub since",
   "April 2013"
  ],
  [
   "Gid Score",
   "70.8"
  ],
  [
   "Rank in category",
   "#1 of 8"
  ],
  [
   "GitHub",
   "phaserjs/phaser"
  ],
  [
   "Last change",
   "Aug 21, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/phaserjs.png"
}