Phaser 4.0 Release Candidate 5 is now available with several new features, performance improvements, and bug fixes based on community feedback and internal testing.
New Features
The Mask
filter now includes a scaleFactor
parameter for creating scaled-down framebuffers. This can help reduce memory usage in large games, though developers will need to manage the scaling logic themselves. Thanks to kimdanielarthur-cowlabs for the initial implementation.
The Shader
class adds a new renderImmediate
method that simplifies renderToTexture
usage when objects aren't part of a display list or need updating outside the regular render loop. The Camera
class also gains an isObjectInversion
property for internal use with special filter transforms.
Performance Improvements
Drawing contexts, including filters, can now exceed 4096 pixels on devices that support larger contexts. We've also improved the balance of rounded rectangle corner rendering to maintain smoothness on small corners while avoiding excessive tessellation.
Bug Fixes
Several stability issues have been resolved in this release. PhysicsGroup.add
and StaticPhysicsGroup.add
now properly check for existing body types and destroy incompatible ones before assigning the correct type. The Blocky
filter now enforces a minimum size of 1 to prevent objects from disappearing.
TilemapGPULayer
has been updated to handle tileset arrays correctly by using the first tileset when an array is provided. Filter transform handling has been improved for both camera focusing and parent transform scenarios.
Additional fixes address DynamicTexture
capture with nested transforms, proper mask behavior within Container
objects, and input handling for overlapping interactive objects in filtered containers.
Availability
Phaser 4.0 Release Candidate 5 is available for download now. Community feedback and contributions continue to be valuable for identifying issues and improvements as we work toward the final release.
Grab it from npm using the beta tag:
npm install phaser@beta
Or get the source/dist files from GitHub.
We do not anticipate publishing any further Phaser v4 release candidates, so RC5 should be considered a production-ready version. It will also form the core of the forthcoming Phaser Editor v5 release.
You can experiment with it in the Phaser Sandbox and in the updated Phaser Labs.