Phaser Studio are very happy to announce the immediate availability of both Phaser v3.87 and v4.0.0 Beta 1. The v3.87 release closes off a couple of high-ticket issues and drops in a compelling new feature: the ability to load web fonts via the Phaser Loader. No more messing around with CSS hacks or cumbersome 3rd party web font loaders. Now it's as simple as:

preload ()
{
    this.load.font('Caroni', 'assets/caroni.otf', 'opentype');
    this.load.font('troika', 'assets/troika.ttf', 'truetype');
}

Then you can use them immediately in your Text Game Objects:

this.add.text(0, 0, 'The face of the moon was in shadow.', {
  fontFamily: 'troika', fontSize: 80, color: '#ff0000'
});

You can load any font type the browser natively supports: TrueType, OpenType, WOFF and you can also supply extra font descriptors to really get a handle on the appearance.

v3.87 also includes a performance tweak which prevents Particles from creating an Animation component if the emitter isn't configured to use animations. This helps with clear-up performance and reduces event thrashing.

Download v3.87 from GitHub or npm.

https://github.com/phaserjs/phaser/releases/tag/v3.87.0

As always, we have updated all of our templates, such as React, Vue and NextJS to use the latest version. We've also updated our Discord Activities templates and Playable Ads plugin.

v4.0.0 Beta 1

However, we didn't stop there! As today also saw the release of Phaser v4.0.0 Beta 1. We have been working on our brand-new WebGL renderer all year, with 5 Technical Preview releases through-out that time frame. Eager readers will have been following the development progress, week by week, in our Phaser World newsletter. And finally, after months of hard work, we have merged the renderer into the core of Phaser and published the first beta release.

Because this is such a monumental upgrade, we are jumping up by a major version number, too. And we're also taking this opportunity to purge out some legacy items from inside of Phaser that we feel have outstayed their welcome. For example, we have culled our own version of the Set data structure and replaced it with the one that all modern browsers have as standard. We have also removed the Geometry Point class and all related functions, because they are all available via the existing Vector2 class. We've also removed IE9 support (anyone remember what IE even is?!) and all the polyfills that came with. In short, we are on a massive Spring clean. In Winter 😀 but it will result in a slimmer, faster API overall.

In lots of cases v4.0.0 Beta 1 should simply just work. If your game digs deep into shaders or custom pipelines, then those will need refactoring, and we will be publishing guides on this in the coming weeks. But if you're just using Phaser 'as standard' then it should be safe to drop-in and test out!

You can download v4.0.0 Beta 1 from GitHub and npm under the beta tag.

https://github.com/phaserjs/phaser/releases/tag/v4.0.0-beta.1

It's also already available in our Phaser Sandbox. Here's an example of how to use the new Bloom parallel filter!

We will be moving hard and fast towards a final v4 release this in the coming month, because we simply don't want to delay getting the stunning new renderer into everyones hands! So please grab it, install it, play with it, prod it, poke it, break it and leave us your feedback both on GitHub and in the new phaser4 channel in our Discord.

Download Phaser v3.87