Navigation

Phaser World Issue 169

Published on 1st March 2024

This week we released the Phaser v3.80.1 point release. The main reason was to address an issue with DOM click events, but it also allowed Ben to sneak in some more context loss updates, this time to do with restoring compressed textures. You can find out more in the 3.80.1 Change Log.

Here is what the team has been up to this week ...

Arian: Hello from Florida! This week I have continued our research into cloud build services. We have also considered implementing our own solution, optimized for our case. So far, we do not have a conclusion on this matter. In the next week I hope to make a final choice and start with a prototype. At the same time, I continue to support Phaser Editor users. If you have any questions about this, contact me on our Discord server, in the #phaser-editor channel.


Ben: How should masks work in Phaser?

They should offer maximum flexibility and compatibility with minimum knowledge and configuration.

Masks should be FX.

FX are composable render steps for an object. This has many advantages. FX can be ordered, reordered, and applied multiple times. This gives maximum flexibility for masks.

I propose two new FX, to supplement/replace the existing mask system:

MaskFromObject: an existing object masks part of the viewport while drawing another object.

MaskFromTexture: a texture is used to mask parts of the object, moving with the object itself.

These MaskFX can use internal optimisations, and have the following properties:

Stencil: whether to allow partially transparent masks, or force being fully off or on.

Threshold: where transparency transitions from being off to being on.

Clever combinations of FX could create effects like a loading bar made of trickling ectoplasm or a sparkling teleporter.

Composition makes cool effects easier and more powerful than ever, and we're looking forward to making this happen.


Francisco: Greetings from Spain (and also Nicaragua from my heart). This week has been positive for phaser-fiber (codename: taconica), as the feasibility tests with Phaser have yielded successful results.

phaser

We've published the React templates and updated all templates using Phaser to the latest version of it. Currently, I am developing a new template with Svelte.


Robert: This week I have been writing codemods to automate the upgrade route of Phaser - our goal is to convert the entire codebase to use both ES Modules and ES Classes. Luckily, the code base is well organized and is reasonable to traverse its Abstract Syntax Tree (AST). The goal is something robust that can be used to add modern features while leaving the code functional for the rest of the team!


Rich: I've been doing all kinds of things this week, but mostly working with John on the new website. The first iteration of this went live yesterday. This is by no means the final site - we haven't even optimized it for mobile yet, and there is lots of content missing. But! It's all powered by our new CMS, the gigabytes worth of image content all comes from our CDN and we did make some improvements here and there to the layout. This is an ongoing process, and we have plenty more services and content to unveil in the coming months.

I've concluded that as CTO, my job has changed dramatically from what it used to be. While I still get to code, my most important tasks are now talking to people, coordinating, and planning. I will never get away from the code fully, and I will never want to, but it's amazing to see things progress steadily and consistently now the team is running at full pace.