Desktop and Mobile HTML5 Game Framework A fast, free and fun open source framework for Canvas and WebGL powered browser games.
image description
HTML5

ufoPhaser Features

mobile phone
WebGL & Canvas

Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile.

Preloader

We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML - all parsed and handled automatically, ready for use in game and stored in a global Cache for Game Objects to share.

Physics

Phaser ships with support for 3 physics systems: Arcade Physics, an extremely light-weight AABB library perfect for low-powered devices. Impact Physics for advanced tile support and Matter.js - a full-body system with springs, constraints and polygon support.

Sprites

Sprites are the life-blood of your game. Position them, tween them, rotate them, scale them, animate them, collide them, paint them onto custom textures and so much more!

Sprites also have full Input support: click them, touch them, drag them around, snap them - even pixel perfect click detection if needed.

Groups

Group bundles of Sprites together for easy pooling and recycling, avoiding constant object creation. Groups can also be collided: for example a "Bullets" group checking for collision against the "Aliens" group, with a custom collision callback to handle the outcome.

Animation

Phaser supports classic Sprite Sheets with a fixed frame size as well as several common texture atlas formats including Texture Packer, Starling and Unity YAML. All of these can be used to easily create animations.

Particles

A particle system is built-in, which allows you to create fun particle effects easily. Create explosions or constant streams for effects like rain or fire. Or attach the Emitter to a Sprite for a jet trail.

Cameras

Phaser has advanced multi-camera support. Easily create extra cameras then position and scale them anywhere on screen. Cameras can be scrolled and also have special effects like shake, flash and fade. Pan around and follow Sprites with ease.

Input

Talk to a Phaser Pointer and it doesn't matter if the input came from a touch-screen or mouse, it can even change mid-game without dropping a beat. Touch, Mouse, Keyboard, Gamepad and lots of useful functions allow you to craft whatever input system you need.

Sound

Phaser supports both Web Audio and legacy HTML Audio. It automatically handles mobile device locking, easy Audio Sprite creation, looping, streaming, volume, playback rates and detuning. We know how much of a pain dealing with audio on mobile is, so we did our best to resolve that!

Tilemaps

Phaser can load, render and collide with a tilemap with just a couple of lines of code. We support CSV and Tiled map data formats with multiple tile layers. There are lots of powerful tile manipulation functions: swap tiles, replace them, delete them, add them and update the map in realtime.

Device Scaling

Phaser 2 has a built-in Scale Manager which allows you to scale your game to fit any size screen. Control aspect ratios, minimum and maximum scales and full-screen support (coming soon to Phaser 3)

Plugin system

We are trying hard to keep the core of Phaser limited to only essential classes, so we built a smart Plugin system to handle everything else. Create your own plugins easily and share them with the community.

Mobile Browser

Phaser was built specifically for Mobile web browsers. Of course it works blazingly fast on Desktop too, but unlike lots of frameworks mobile was our main focus. If it doesn't perform well on mobile then we don't add it into the Core.

Developer Support

We use Phaser every day on our many client projects. As a result it's constantly evolving and improving and we jump on bugs and pull requests quickly. This is a living, breathing framework maintained by a commercial company with custom feature development and support packages available. We live and breathe HTML5 games.

Web First

Phaser exists within the ecosystem of the web browser. It was built to allow you to create web based games and that is where it will always focus. It's a rapidly changing landscape and we're staying on-top of these changes to ensure new browser APIs are supported quickly.

LATEST NEWS

thumb
 

A comprehensive tutorial with example code on how to create texture atlases for Phaser 3 with Texture Packer.

thumb
 

The first in a series of long-form tutorials covering the process of creating a Facebook Instant Game with Phaser 3.

thumb
26th July 2021

Here is a quick HTML5 prototype to shuffle and draw a deck of cards using Phaser 3, full commented source code available.

thumb
23rd July 2021

Quickly create decentralized web games with this template.

thumb
21st July 2021

Create the hyper casual one button game where you run around the circle jumping over obstacles. Full code available.

thumb
19th July 2021

A tutorial on how to select multiple units by dragging a selection box over them, like in an RTS game.

thumb
16th July 2021

In this new video learn how to add Tilemaps to your game using an data array.

thumb
15th July 2021

Blast away Coronavirus, Ebola and more in this pandemic inspired Web Monetized game.

thumb
14th July 2021

Full source code to make a game like qomp, where you play as a Pong ball that must escape the paddles.

thumb
13th July 2021

A fast-paced 2D multiplayer shooter. Experience action-packed combat with hundreds of weapons and multiple solo and team-based game modes.

thumb
12th July 2021

How to create a fog of war effect to give the right atmosphere for a dungeon crawler.

thumb

A comprehensive look at the power consumption used by Phaser games and how to reduce it.

thumb

Blast rocks, dodge the saucers and hyperspace with care in the official web version of the Atari classic.

thumb

Use events to pass data between Scenes for decoupled code.

thumb

A classic Mahjong game with an old-school feel and retro music. Find the matching pairs and clear the board before the timer hits zero!

thumb

Turn your 2D games in to shiny new 3D games with almost no effort thanks to three.js and Phaser 3D library.

thumb

Use this tutorial to learn how to have enemies, opponents, or NPCs look at the player in a top-down game.

thumb

Create a clear path so the explosive Oddbod character floats away safely by removing a range of obstacles as fast as you can!

thumb
30th June 2021

The final part of how to build a multiplayer Space Invaders game.

thumb
29th June 2021

Enjoy 5 classic game modes with beautiful graphics, relaxing gameplay and six themes.

thumb
28th June 2021

Building Mobile Games with Ionic Framework and Phaser JS.

thumb
25th June 2021

Use gravity and thrust to create a prototype of this hit hyper casual game.

The Phaser community is huge, prolific, friendly, and awesome!
Brand new content is added daily. From game releases, to videos and tutorials.

QUICK START GUIDE

github mascot

1. Download

Download Phaser and work locally or develop in the cloud. It's up to you!

Download Phaser
IDE icons

2. Setup

Get started with our guides:

sublime icon JavaScript visual studio icon TypeScript (VS)
rocketman

3. Create!

Share your game and get support from our friendly community.

Join the Community
border

Games made with Phaser

Thousands of games are made with Phaser. Here are some recent favorites:

border