Phaser (game framework)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Phaser
Phaser Logo.png
Developer(s)Photon Storm
Initial release12 April 2013; 8 years ago (2013-04-12)
Stable release
v3.55.2 / 27 May 2021; 4 months ago (2021-05-27)
Repositorygithub.com/photonstorm/phaser
Written inJavaScript, TypeScript
TypeGame engine
LicenseMIT License
Websitephaser.io

Phaser is a 2D game framework used for making HTML5 games for desktop and mobile.[1] It is free software developed by Photon Storm.[2]

Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for fast rendering across desktop and mobile. It uses the Pixi.js library for rendering.

Games can be deployed to iOS, Android and native desktop apps via 3rd party tools like Apache Cordova and phonegap.[3]

History[edit]

Richard Davey announced the first release of Phaser on a blog post in April 2013.[4] Version 1.0 was released on September, incorporating the Pixi.js library for rendering.[5]

The last official version of Phaser 2 was 2.6.2, but to allow improvements to the stable version while working on Phaser 3, a new repository was created: Phaser CE (Community Edition).[6] Phaser CE is thus the currently recommended stable platform for development with Phaser.

Phaser 3.0.0 was released on February 13, 2018, and development is ongoing on GitHub.[7] Most elements and features of the framework have been rebuilt from scratch using a fully modular structure and data-orientated approach. Phaser 3 includes a brand-new custom WebGL renderer designed for modern 2D games. Since then, much of the documentation and examples for users has been completed, and the majority of features have been implemented.

Currently in development is Phaser 4, announced August 19, 2019, which is an attempt to rewrite Phaser 3 in TypeScript. It is not an API rewrite and will instead be focused on porting the scripts that are currently in Phaser 3 to TypeScript.[8]

Architecture and features[edit]

Phaser can run in any web browser that supports the canvas element. Games made with phaser are developed either in JavaScript or TypeScript. A web server is required to load resources like images, audios, and other game files as Browsers requires web pages to access files only from the same origin.[9]

Rendering[edit]

Phaser can be either rendered in WebGL or a Canvas element, with an option to use WebGL if the browser supports it, or if a device doesn't support it, it will fall back to Canvas.

Physics[edit]

Phaser ships with 3 physics systems: Arcade Physics, Ninja Physics and P2.JS.

Arcade Physics is for high-speed AABB collision only. Ninja Physics allows for complex tiles and slopes, which are adequate for level scenery, and P2.JS is a full-body physics system, which supports constraints, springs, and polygon among others.

Animation and Audio[edit]

Animation can be done in phaser by loading a spritesheet, texture atlas and creating an animation sequence.

Web audio and HTML5 audio can be used to play sound in phaser.

See also[edit]

References[edit]

  1. ^ https://www.javascripting.com/view/phaser
  2. ^ https://gamedevelopment.tutsplus.com/articles/how-to-learn-the-phaser-html5-game-engine--gamedev-13643
  3. ^ https://github.com/photonstorm/phaser
  4. ^ http://www.photonstorm.com/phaser/announcing-phaser-flixel-html5-and-our-adobe-max-session
  5. ^ http://www.photonstorm.com/phaser/phaser-1-0-and-the-journey-we-took-to-get-there
  6. ^ https://phaser.io/download/phaserce
  7. ^ "Phaser - The fast, fun and free HTML5 Game Framework". phaser.io. Retrieved 2018-05-15.
  8. ^ "Phaser 3 Dev Log #148: Phaser 4 Announcement and a catch-up on Phaser 3.18 and 3.19 releases. - Phaser3 - Phaser". phaser.io. Retrieved 2020-04-26.
  9. ^ "Same-origin policy - Web security MDN". mozilla.org. Retrieved 2021-09-30.

External links[edit]