40,684
stars
+9
7,185
forks
1,181
watchers
2,542
prs
4,669
issues
178
releases
132
discussions
README
Phaser - HTML5 Game Framework !Phaser Banner !JSDelivr !GitHub Phaser is a fast, free, and fun open source HTML5 game framework that offers WebGL and Canvas rendering across desktop and mobile web browsers and has been actively developed for over 13 years. Games can be built for the web, or as YouTube Playables, Discord Activities, Reddit games, Twitch Overlays or compiled to iOS, Android, Steam and native apps using 3rd party tools. You can use JavaScript or TypeScript for development. Phaser supports over 40 different front-end frameworks including React and Vue. Phaser is commercially developed and maintained by Phaser Studio Inc along with our fantastic open source community. As a result of rapid support, and a developer friendly API, Phaser is currently one of the most starred game frameworks on GitHub. Interested in learning more? Click the image below to watch our intro video. --- Installing Phaser from NPM Install via npm: bash npm install phaser Then import it in your project: js import Phaser from 'phaser'; Using Phaser from a CDN Phaser is on jsDelivr which is a "super-fast CDN for developers". Include _either_ of the following in your html: html It is also available from Cloudflare's cdnjs: html Create Phaser Game App The easiest way to get started quickly with Phaser is our create-phaser-game app. This CLI tool presents an interactive selection of official project templates and demo games. Issue the command, answer some questions and the app will download and configure the right package for you. bash npm create @phaserjs/game@latest npx @phaserjs/create-game@latest yarn create @phaserjs/game pnpm create @phaserjs/game@latest bun create @phaserjs/game@latest We support Vue.js, React, Angular, Next.js, SolidJS, Svelte and Remix with Vite, Rollup, Parcel, Webpack, ESBuild, Import Map and Bun. Most come in both JavaScript and TypeScript versions. View the create game app tutorial. How Big is Phaser? Don't be alarmed if you look at phaser.js and see a file over 8 MB. Over 84% of that is inline documentation - JSDoc comments, type annotations, and detailed method descriptions that power the TypeScript definitions and API docs. It's there for your IDE, not for your players. The minified build, phaser.min.js, strips all of that out and comes in at 345 KB with standard gzip web server compression. This is the full version, with every feature included, but is still smaller than most texture images. You can reduce it further still by tweaking the build settings to exclude features your game doesn't need. | Build | Raw Size | Compressed (gzip) | | ----- | -------- | ------------------ | | phaser.js (with docs) | 8.23 MB | - | | phaser.min.js (full) | 1.29 MB | 345 KB | | phaser-arcade.min.js | 1.18 MB | 313 KB | Why Phaser? - Battle-tested - Over a decade of active development. Tens of thousands of games shipped. A huge community of developers who've seen it all. - Truly cross-platform - One codebase
Top issues
#6927[3.86.0] Gaps/lines between the images on camera move21 comments · 2024-10-21#7051Strange rendering issues10 comments · 2025-02-18#4963PhysicsEditor verticies wrong - MatterJS Physics10 comments · 2020-01-20#7306Significant FPS drop with simple Container addMask() usage in WebGL9 comments · 2026-05-20#7204[4.0.0-rc.6] Spine position incorrect inside a container with .setFiltersForceComposite(true)9 comments · 2025-09-25#7298Investigate alternative libraries for type generation than `jsdoc`8 comments · 2026-05-07#6989Performance Issue on low end mobile devices5 comments · 2024-12-18#6918[3.86.0] Resize RenderTexture/dynamicTexture issue5 comments · 2024-10-11
Discussions
#7333Phaser v4.2.10 comments · 2026-07-09#7318Phaser v4.2.00 comments · 2026-06-19#7290Phaser v4.1.00 comments · 2026-04-30#7274Phaser v4.0.00 comments · 2026-04-10#7268Phaser v4.0.0 Release Candidate 71 comments · 2026-03-25#7230Beginner-friendly Phaser Starter (Community Package)0 comments · 2025-12-28#7228Phaser v4.0.0 Release Candidate 60 comments · 2025-12-23#7190Phaser v4.0.0 Release Candidate 51 comments · 2025-08-22
Latest release
Phaser v4.2.1 v4.2.1 2026-07-09Version 4.2.1 - Giedi - 9th July 2026 Fixes - Stencil option stencilInvert works correctly (an alpha bug prevented it from having the intended effect) - Framebuffers now correctly clear stencil on use - The global stencil settings defaulted to deactivating the stencil write mask, so it couldn't actually run the clear process correctly. Write mask is now enabled by default, but is never triggered because default stencil operations keep existing values. - Remove inline access of Phaser namespace from CombineColorMatrix, ImageLight, and Texture. These would break in the ESM build. Tha