Newsletter
Published on 9th December 2016
Welcome to Issue 59 of Phaser World
This week was Computer Science Education week, and the Code.org web site is the central hub for all things to do with it, packed full of tutorials and ways to learn coding. Those of you who've been reading this newsletter long enough may remember last year Code.org released the Minecraft Adventurer. Well they've done it again with the brand new Minecraft Designer, and yes, it's powered by Phaser again :)
It's a really thrilling feeling to know that my little creation was central to allowing literally tens of millions of students to learn how to code. Even though none of them knew it! And when I see tweets like this it honestly makes me feel humble.
On the home front we've made some phenomenal progress with Phaser 3 this week, and there's a nice big update to Phaser Editor too. For those of you taking part in Ludum Dare this week: good luck! and be sure to tweet me your games.
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
Minecraft Hour of Code Designer
Game of the Week
Program animals and other Minecraft creatures in your own version of Minecraft, a coding tutorial for students and educators.
Staff Pick
Grab the fuel as you hop from asteroid to asteroid in this game based on the popular kids TV show.
Run through the star ship, avoiding the spikes and unlocking medals and achievements.
The Mermaidens are seven mermaid princesses and their friends, who feature in this matching pairs game.
Fight against hordes of enemies to get your black belt as a super martial artist using just single taps and a superpower.
Phaser News & Tutorials
The second Phaser CE release from the community, including new features, updates and bug fixes.
Building Multiplayer Phaser Games
A new tutorial and GitHub repo for creating multiplayer Phaser games with SocketCluster.
An updated editor, new marketplace client, improved scene editor, new learning content and more!
In the second part of his tutorial, Emanuele adds in a new harder tile type to the game.
Learn how to make a small platformer game, with player, coins and even a lava pit to avoid.
Patreon Updates
Thank you so much to the following new Phaser Patreons who joined us this week: Danny Fritz and Matthew!.
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
Phaser 3 development this week has been intense to say the least. I personally have added in 69 new math functions, covering everything from interpolation to value snapping. I also added in the brand new global Texture Manager, the Loader and the WebGL Renderer. It's really exciting to finally be able to run all of the early tests again, and see things rendered on-screen :)
For too long my work has consisted purely of monitoring output in the console, but thankfully no longer! I'd like to take a little moment to explain in more detail what I've been doing:
Phaser 3 is now built with webpack2. This has literally replaced the entire build chain from Phaser 2, which quite frankly is a great thing, because that had grown into a beast. In order to benefit from using webpack2 I had to take all the work I'd done so far, and break it up into CJS modules. In order to speed-up this process I actually back-ported a lot of the code from Lazer back into Phaser 3. Yes, you read that right - a huge amount of Lazer code was stripped of its ES6'ness and then merged with Phaser 3. As strange as that sounds it actually makes complete sense, and for me feels like everything is coming a full circle, and the ends are joining up properly.
I spent a lot of time creating the Lazer modules, so I'm glad to have them re-used within Phaser 3. I also spent a lot of time creating the brand new systems, such as the new Texture Manager, and State Manager, and it's nice to have these now all broken down into tidy little modules, imported cleanly via webpack. If you take a glance at the structure of the v3 source folder you'll see what I mean.
So what's next on the list? I need to finish off porting over the Cache, adding in the final few Loader functions, and then I can start putting the Game Objects back in. At the moment only Image exists.
The plan is that I really want to release a 'Beta 1' before the end of the year, although that is shockingly close already. This will not be feature complete, for example I may leave out all of the Input classes (except keyboard handling), physics and sound - because they all need recoding from scratch - but Beta 1 will still be perfectly usable to make games with. More importantly it will allow you to start playing around with it. Because it differs from how Phaser v2 works in a lot of important ways, so the sooner you get used to the new structure, and where to find things, the better. I'm also really keen to see how the new renderer works for you all.
Phaser 3 Graphics Update
While I've been getting all the plumbing sorted out, Felipe had the task of building the brand new Graphics API from scratch. We're literally not using anything at all from Phaser 2, and started over again, mostly to dramatically improve performance, but also because we feel the API could be cleaner as well. Over to Felipe ...
"For the shapes and line rendering I decided to go with a canvas-like API. This is because I feel the API expresses well the basic instructions to generate any type of shape, like lines, stars, rectangles, polygons, etc. This implementation layer will work mostly as an intermediate layer between a more object oriented approach for shapes like the ones mentioned before.
Most of the work has been done in WebGL, since the API is the same as canvas I don't have to worry about that. Right now to do a simple circles you just have to write it like you would with canvas. For example:
As you can see it's the same functions as canvas. The only difference is that at the end of the frame you must call "flush()". This is because all of the shapes and line information is encoded into the vertex buffers and then sent in a single drawcall. This is great since you don't have to pay any penalty on state changes like moving from drawing lines to polygon shape to arcs. It also limits the amount of indirection layers between the drawing routine and WebGL. If you look into the source of the implementation you'll mostly see WebGL calls.
Here is a small look of what can be done so far:
Geeky Links
Matt Hacket from Lost Decade Games has released Indie Game Sim! It's like a cross between Super Mario Maker and Game Dev Story. "Indie Game Sim lets you make your own games for fame and fortune. Easily create games using the Djinn Game Editor, and publish them on Vault, the #1 online game store. Garner new fans, receive harsh reviews, and learn from your mistakes to become the best developer you can. Play games made by competing developers to unlock their secrets and use them in your own games. But beware! Darkness is just around the corner, and has some concerning questions for you ... "
Benedikt Meurer is one of the lead developers working on V8, including Ignition and TurboFan. He has recently started blogging in more depth about the changes being made to V8, and when we can expect them to land in Chrome, and it makes for some fascinating reading.
Talking about fascinating reading, Erik Bernhardsson decided to analyse the git commit history and source code of some massive projects such as Git, Apache and Rails, and plotted graphs to see how much of their original code base still existed, even up to 10 years later. The results are quite something! So the next time you think "I'll just hack it in and replace that later", just remember: you probably won't :)
Phaser Releases
The current version of Phaser CE is 2.7.2 released on December 6th 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.