Newsletter
Published on 2nd December 2016
Welcome to Issue 58 of Phaser World
Hello December! Although I've started to see Christmas themed games adding to my news queue, I promise not to inflict them upon you just yet! I will however gladly share the wonderful DevRunner - this weeks star game, and great fun to boot :)
There's a new release of Phaser CE, lots of Phaser 3 development news, new tutorials, new plugins and a fruit based mahjong game! What's not to love?!
Until the next issue, keep on coding. Drop me a line if you've got any news you'd like featured (you can just reply to this email) or grab me on the Phaser Slack or Discord channels.
Games made with Phaser
Game of the Week
Take on the role of a developer in this endless runner. Can you out run the unstoppable deadline? Of course not, but see how many bugs you can avoid on your way :)
Staff Pick
Try this tile shifting fruity mahjong game!
A panda themed, physics powered, multiplayer collecting game!
You are a courageous Rabbit Warrior, armed with a sword and hammer, travel the world and activate the shrines.
A competitive endless runner. Play as a ninja, avoiding the obstacles and shurikens coming at you.
Phaser News & Tutorials
The first Phaser CE release from the community, including new features and bug fixes.
A comprehensive Phaser + ES6 + Webpack2 package to get you developing quicker than ever before.
The base game is enhanced, with a Player, and key / door unlock mechanism.
A plugin to show the FPS rate, frame intervals and performance information.
The start of a port of Phaser to Fable and the F# Compiler.
Patreon Updates
Thank you so much to the following new Phaser Patreon who joined us this week: TOM WOR.
Also thank you to Christopher Naron for the donation.
Patreon is a way to donate money towards the Phaser project on a monthly basis (you can also make one-off donations). Donations start at $1 and receive discounts, forum badges, private technical support from me, and my eternal gratitude, in return :)
Development Progress
I'm very pleased that pull requests for Phaser CE keep coming. I'm merging them as fast as I can, but we're already hot out of the 2.7.1 release and zeroing in on 2.7.2. As outlined in my video about Phaser CE, it will only really live for as long as the community wish it to do so. Your updates are literally its life blood.
Phaser 3 Updates
On the Phaser 3 front development has been split between myself and Felipe. Felipe started off the week adding in getBounds support to the new Transform class. It'll now accurately determine the local and global bounds, iterating intelligently through its children as needed:
He then moved on to starting work on the new Graphics functions. The Graphics class in Phaser is of course based on the Pixi v2 Graphics class, and allows you to draw geometry to a Graphics object, setting line, stroke and fill colors as you go. The result Graphics object can be rendered as-is, or used for a mask. It has a few notorious issues, such as it's inability to render particularly smooth (or accurate) circles / arc shapes, and the fact that it causes a shader swap and batch flush whenever you encounter a Graphics object in the display list.
Rather than port it all over we figured now was the time to rebuild it, in a way more fitting for Phaser 3. Which is what Felipe has been working on. I'll have more to show on this front next week.
Please wait, loading ...
I had the slightly less glamorous, but no less important, task of getting the new Loader into Phaser 3. I had already done a lot of work on a new Loader for Lazer, so it was a case of taking that code, modifying it for CommonJS, and updating it. The new Loader is now in GitHub and works quite differently to the old one.
In Phaser 2 the Loader is one giant class that handles everything. It has a lot of features I'm very happy with, but it's hard to extend, and didn't map well in to a module structure. So I attacked it from a different perspective. In the new Loader the actual Loader class is tiny, nothing more than a few data sets and a queue manager. It works by taking in one, or more, File objects and then parallel loading them. The File objects themselves are fully self-contained tiny little loaders. They handle all the logic involved in the loading and parsing of themselves. This means it's entirely possible in Phaser 3 to not actually use the Loader at all, but simple create an instance of a File object and have it load itself, listening to the events as needed.
They're also a lot more powerful. Each File can have its own XHR settings, meaning you can set specific files to perhaps have their own xhr username or password, or response type. I'm also now using XHR to load everything, including images. In Phaser 2 images are loaded in via Image tags, and then converted upon load into WebGL textures. In Phaser 3 the image data is streamed in via XHR to an array buffer. WebGL can use this immediately, with no additional parsing. It also means you get a per byte download progress for every file, allowing for some highly accurate progress bars!
To support Canvas the array buffers are converted back into Image tags via base64 encoding, or you can instruct the Loader to just use Image tags anyway. The key thing here is choice: You now actually have one.
There's a little more work to finish off with the Loader early next week, and then I can progress to getting the Game Object Factory back in, and porting over the new renderer. I'm very happy with progress. The building blocks are really falling into place. It's feeling clean, and sensible, and well structured. Lots more to come, very soon.
Geeky Links
Welcome to the OrDeR Of ThE ShAdOw Wolf cyberzine. A glorious throwback to the ascii based zines of the early net (and bbs era before it). Some pretty neat content too.
No-one does big data quite like Google, and Timelapse is a stunning example. Timelapse is a global, zoomable video that lets you see how the Earth has changed over the past 32 years.
Floppy Days is a vintage computing podcast that covers all kinds of retro systems. It's not just about games, in fact quite a lot of it is just about people who really love their retro kit. Great commuting listening.
Phaser Releases
The current version of Phaser CE is 2.7.1 released on November 28th 2016.
Phaser 3.0.0 is in active development in the GitHub v3 folder.
Please help support Phaser development
Have some news you'd like published? Email support@phaser.io or tweet us.
Missed an issue? Check out the Back Issues page.