Navigation

Suggestions for Phaser 3

Published on 28th August 2016

Post Artwork by Charlotta Tiuri

Greetings!

With Phaser 2.6.2 released last week, I'm now setting my sights to the Phaser roadmap, and Phaser 3.0 in particular. If you've not been keeping-up with my weekly reports in Phaser World, then let me refresh you. At the end I'll be asking for your feedback and suggestions.

First of all: Phaser 3 is not Lazer! The reason for the jump in version number is because I'm (finally) following semver guidelines more closely. In short:

  • Phaser 2.6.2 contained a month's worth of updates and bug fixes, but I removed all of the renderer updates for it, as it was a point release.
  • Phaser 3 is going to contain all of the work we've done with the renderer recently: This includes WebGL Tilemaps, Multi Textures, Compressed Texture support, rotated atlas frame support, multi-atlas support and the new main loop system.

However because we're jumping to a new major version number, we've also got the opportunity to make more fundamental changes in v3 as well. For example we could look at implementing all of the work we did creating a new Transform class and manager. We could overhaul the Sound system, splitting it up, adding in more Web Audio controls. We could consolidate a number of Pixi level classes, ones that we really don't use any more, and bring in some of the new renderer features we worked on last year, including lighting and multi-camera support.

It's at this point my questions start to pop-out. The problem is that I'm "too close" to the project. I always want Phaser to be the absolute best it can be, no matter what, and would happily tinker with it, for ever and a day, to try and achieve that.

You could argue this isn't a great use of our time. Or maybe you'd argue it is! But right now I think we've got two paths we could take with Phaser 3:

1 We simply implement all of the cool new renderer tech we've been working on for months now, and call it a day. Perhaps letting the community take over the Phaser 3 branch from here, should they want to push it further.

2 Or, we use the jump in version number to make other more significant internal changes as well. The objective being to extend the useful life of Phaser well into 2017 and beyond.

The first option is, of course, by far the easier. Most the hard work is done already. So I fully imagine we could have a v3 beta release within a month.

The second feels like more of a longer-term goal. The renderer updates alone will keep Phaser a perfectly viable game dev solution, and quite frankly, cutting-edge in that regard. But there's plenty more we can do internally to clean up the relationship between Phaser and Pixi, and tidy things up.

The problem is that the world is moving towards ES6 faster and faster, which is what Lazer was meant to be all about. Despite months of hard work on Lazer, it is no-where near production ready yet, and won't be at any point this year. The simple fact is that we cannot work on both.

There is another option too, one where we take Phaser 3 and recode it in ES6. So re-creating the same overall class structure, and component relationship, just in a more modern language. Allowing us to take advantage of the likes of Roll-up and Buble.

This feels like it could be a sensible step. It would provide an ES6 build of Phaser, in a much quicker turn-around than finishing Lazer could provide. The problem is that it will take much more time to do this, and I'd really like to get all of the new renderer tech out and in your grubby hands this side of Christmas. If we go down this route, that isn't something I can guarantee, and I really don't want to release a Phaser 3 at some point in September, only to have Phaser 4 come out in the New Year (being an ES6 build of it). Perhaps we should call it Phaser ES6? :)

As you can see there's no clear or obvious path. There are limitations, in that there are only two of us dedicated to this, so time is an issue. There are plenty of pros and cons both ways. Do we pick the fast route and get all the new tech in and released? Or do we play the slightly longer game, and evolve the API internally too?

Or is there another option we've not even considered yet? This is what the comments are for! If you have any thoughts towards all this, please let me know. It'll play a big, deciding, role in our eventual choice.