While we were hard at work updating Phaser, the guys over at Pixi.js were also taking their library through some significant internal changes. Phaser relies entirely on Pixi for all rendering, so anything they change impacts on us. Sometimes these are small changes we can slip into a regular point release, and other times they are significant API changing updates such as with their 1.5 release.
We were chomping at the bit to integrate 1.5 into Phaser. Because as well as some cool new features such as the ability to tint sprites, they had also revamped Pixis guts, allowing us to do away with literally thouands of lines of code that was no longer required.
Renderer Turbo Boost
The way in which Pixi handled its display list was vastly simplified and is now a lot faster. This opens it up for games that before would have been extremely difficult to pull-off, such as isometric games, or games that require constant depth-sorting.
Seeing this was the kickstart we needed to re-do all of Phasers game object classes. Literally every single one, from Sprite to Text, has been recoded from scratch. We've done away with masses of pre-update loop processing and removed loads of internal cache vars, and as a result we're seeing massive fps increases across the board while actually gaining flexibility, not reducing it.
Pixi also introduced Sprite Batches. This WebGL only feature shifts all of the transform calculations away from JavaScript and onto the GPU, and as a result can blast literally hundreds of thousands of sprites around (GPU depending of course). As WebGL spreads across the desktop and now into mobile this is a welcome addition.
Full body Physics
With a clean and fresh set of game objects, a greatly improved Group handler and fixes across the board, it was time for us to address the last remaining elephant in the room: ArcadePhysics. We had the option of either struggling on with it or doing what we'd been planning for a while: replacing it with a proper physics system. Needless to say we chose the later. Our system of choice was the excellent p2.js
by Stefan Hedman. Although a very new physics system, Stefan has been releasing JavaScript physics APIs for a while now (Cannon.js being probably his most famous), and we really liked what we saw in p2. The API was clean, 2D focused and best of all: really tiny. Yet it still offered us all the things you'd expect: contact events, Springs, Constraints and a choice of solvers.
High on our success of spring cleaning with Pixi we dived into p2 and couldn't be more happy with the results. Integration went smoothly, a few bugs were fixed and Stefan has been awesome at responding to issues and helping with integration. It's a proper game-changer, in every sense of the word, and we cannot wait to see what you all create with it :)
When will it ship?
Phaser 2.0 is 95% feature complete and right now we're on a bug-fixing streak. Our aim is to close all issues on github before launch, and we're cracking through them at the moment to achieve that. We are also updating all of the Examples to ensure they work fully, revising the documentation and preparing new demos.
Baring "acts of God" (or client work) we're looking good for our target release date of March 13th. Exactly 6 months after the release of 1.0.
If you wish to follow progress you can do so in the new Phaser sub-forum and github branch. They're still called "1.2" but we realised that it was such an API changing upgrade we had to give it a more substantial release, hence 2.0. So if you see any comments relating to Phaser 1.2 anywhere, that is the same thing as 2.0.