Navigation

Phaser World Issue 29

Published on 6th May 2016

speccy

There are a number of exciting things to announce this week, so let's get started!

Back in 2014 I commissioned the development of a Motion Path Plugin for Phaser. The plugin allows you to create beautiful, complex and fully branching motion paths for sprites (or any game object) to follow. You can use them for the enemy attack waves in a shoot-em-up. Or for causing cards to fly smoothly onto a game board, or for special effects in menus and backgrounds.

They offer a lot more versatility than tweens, because you are able to specify the number of control points along the path. You can then define actions for sprites to take as they pass each control point, such as rotating, speeding-up, firing, or any custom function you may have. The paths can be created with code, or visually in a path editor, the plugin just needs the path in a JSON format.

For one reason or another the plugin was never quite finished, and it has sat on my hard drive ever since, waiting for that mythical point where I had some time to devote to it. This is something I've now finally done. The plugin API is complete, and I've added jsdocs to most of it and put together some examples.

I was doing this with a view to releasing it as a commercial plugin, like Box2D is. Yet the truth of the matter is that plugins just don't sell that well. Over time it would shift a few hundred units, sure, which would at least recoup the money I paid to have it built (several thousand $). But it's a really powerful plugin. Nothing like it exists for Phaser, and it can really enhance games. So I'm going to do the right thing, and release it for free. I'll announce here when it's out, but it won't be long.

New WebGL Tilemap Renderer

When I polled everyone asking what they wanted to see in Phaser 2.5, the resounding response was 'faster tilemaps!'. Which is entirely fair, because Phaser's current tilemap rendering solution sucks on WebGL (canvas is ok, but WebGL isn't used properly at all).

So I took the decision to take some of the Patreon money I've received, and pay a developer (Pete Baron), so that he could look at implementing a brand new WebGL tilemap renderer. Thankfully tests so far are proving very fruitful! You can track development in the Phaser dev branch, and I'll post more details here when it's ready. Realistically I'm expecting to finish off Phaser 2.4.8 next week, which is a pure maintenance release, and then we'll merge the new tilemap system (and path plugin) into 2.5.0.