Twitter icon Forward icon

Phaser Newsletter #4 - April 2014

Welcome to the April issue of the Phaser Newsletter. In this issue we cover the release of Phaser v2.0.3, Phaser's first birthday, a bunch of great new tutorials, games and more. Enjoy!

Happy Birthday Phaser!

On April 12th 2013 we pushed the first every commit of Phaser up to the github repo. So we're now 1 year old :) It's incredible to think how much has changed since then and in such a short period of time.

The first version of Phaser was a more or less direct port of Flixel into TypeScript. I literally hacked it together over the space of a couple of days just to get something up and running. I wanted to develop it 'visibly', so commited all of my work to a public github repo as I built it.

Over time it grew more powerful, and some early adopters had picked it up and start using it, releasing games. This was a huge motivation boost for me, and I continued to plough time and energy into it. Right up until the v0.95 release Phaser was built in TypeScript, and I had received a few contributions towards it, but it was still very small scale.

Then a really important thing happened: Microsoft totally messed up the release of TypeScript 0.9. Phaser no longer compiled under it, and I literally wasted weeks of my time trying to resolve it. But TypeScript was so unstable it was draining me of all willpower. This lead me to ask on the forum if anyone cared if I swapped to using plain JavaScript instead, and the response was incredible. The overwhelming majority wanted Phaser to be written in JavaScript. Lots had been scared away by it being TypeScript in the first place. So I literally cleared down everything and started from scratch.

Second Reality

This allowed me to make a second really important change: Moving to using Pixi.js as the renderer. Pixi was gaining real traction at the time and the fact it would give Phaser WebGL access was a real boost. It meant I had to cut some quite powerful features out, such as multiple camera support (something we've still not got back yet), but the positives were too vast to ignore. Pixi went in, powering the rendering and JavaScript driving it all.

That was the major turning point. By using plainJavaScript the community could get involved easily. It didn't rely on them understanding TypeScript first. As a result involvement skyrocketed and we haven't looked back since.

Phaser has evolved a lot since those early days, but I've still tried to keep it true to the original aims: It should be fun and easy to work with. A single file, a simple text editor and nothing more and you can get running.

I strongly believe that the moment a framework depends on npm or similar package managers, or a module system that enforces a coding style you may not be used to (or like!) then you're already limiting who will use your framework. By all means let them adopt their own workflow, just don't force yours onto them. It was a mistake I made in the early days, but definitely learnt from. And Phaser has totally benefitted as a result.

Future TimeJump

So what's in store? We already touched on it in the previous issue: retaining a stable API, fixing issues as they arise and adding enhancements where suitable. And building new examples and tutorials, both of which we've got well underway.

So thank you everyone who has ever tried Phaser. And thank you if you've gone that extra mile by writing a tutorial, helping fix a bug or added new features.

Here's to another year :)

Phaser 2.0.3 is Released

In this release we have upgraded both pixi.js to v1.5.2 and p2.js to v0.5.0. This improves features and stability across the whole framework, and as always you'll find the complete list of improvements below.

We've taken some time to enhance the Particle Emitter adding a few substantial features such as the ability for Particles to now change scale or alpha over time using any of the easing functions, or apply a blend mode. These small additions now allow you to create visually more impressive effects than before, and while we still have a complete overhaul of the particle system on our roadmap it's a welcome boost in the meantime.

Along with the p2.js update we have also refined the Phaser P2 classes, making tweaks that help overall performance, such as splitting the world bounds into separate bodies. The World now has a default contact material, which allows for easier setting of responses when objects collide with no materials set. All in all it's a powerful update.

What's interesting is that loads of the new features and bug fixes in this release have come direct from the community. Of course we've been busy and working hard on Phaser as well, but the volume of contributors now is fantastic. We've have always listed their names next to the issues they helped resolve, but now we're doing so with their github usernames directly so they appear on the revisions change log.

As promised with the 2.0.0 release we have done all of this without changing existing API calls in the core Phaser classes. New features are introduced either via the creation of new optional parameters or by creating new methods. Where a feature has been deprecated we have flagged it as such in the docs, but left it in so as to not break existing code.

The codevinsky Phaser Tutorial Series

Active Phaser forum member codevinsky (Jeremy Dowell) has started publishing a series of high quality and in-depth tutorials on using Phaser 2 on his blog.

Part 1 is a really comprehensive Getting Started Guide.

Part 2 covers physics and prefabs.

Part 3 introduces player movement.

Part 4 explains timers, Group recycling and player death.

There are more tutorials on the way, and these are an excellent introduction for anyone wanting to learn Phaser 2.

New Phaser web site on the way

The new Phaser web site is nearly finished! We've always been happy with the design of the current site, but it was just a single page and meant as a stop-gap until the full site was ready.

Thankfully we're just days away from having the code done. Then we need to populate all the new content areas and we can go live. It will feature a brand new showcase, integrated docs and a proper news system. Most importantly of all though, it gives us lots of room to grow.

Elevator Miner

Elevator Miner

Elevator Miner is an arcade/action games where you must control the elevator on the right/left side of the screen to move the digger, and dig all the treasure while avoiding all the obstacle.

If you're using desktop, you can use W/S to move the left elevator and UP/DOWN Arrow to move the right elevator. Of course on mobile you can just drag the elevator with both of your fingers.

Play Elevator Miner

Party Tricks

Phaser 2.0.3 introduced a couple of powerful new features to the Particle Emitter. Although we still plan on overhauling the emitter entirely in the future, the new additions now make it much more flexible than before. The 3 main additions are:

You can now set the particles to change scale over time. Using the Emitter.setScale method you can now specify a starting and ending value for both the x and y axis, a rate of change and the easing equation used to achieve the change. When the particle is emitted it starts scaling. By scaling from a negative to a positive value you can create the effect of the particle 'flipping over' as can be seen in the new Glass example.

Particles can now also change alpha over time. Again you define the start and end alpha values, the ease and the rate. So you can easily make a particle fade on or off at a rate independent from its lifespan.

Finally you can also control the blend mode used when particles are drawn. Canvas blend modes are still experimental and browser support isn't very wide yet, but it's there if you know you can utlitise it.

You'll find the new examples in the Phaser Examples repository and the documentation updated to reflect the new methods.


copy that floppy

If you'd like a game, tutorial or product featured in the newsletter then please get in touch. Until then enjoy Phaser 2.0.3 and we'll be back next month with issue 5.


& the Photon Storm team

"Reality is broken. Game designers can fix it." (Jane McGonigal)