A lightweight alternative to Containers for Phaser 3 Games.

Posted on 16th Oct 2018. Follow @phaser_ and get the Phaser World newsletter.

image

William, over on the Phaser Games site, has written a new component called UI Blocks which allow for an alternative to Containers. And explains in depth the difference between Groups and Containers in Phaser 3: "Coming from a background of flash I was used to creating MovieClips and adding other objects inside those clips. I especially use this for user interface components. In Phaser 2 I use groups quite a bit to create UI.

To understand the problem, we need to understand a bit about groups and containers. Lately, I’ve been seeing a lot of confusion about groups and containers. It is especially confusing for those of us that are coming from Phaser 2. Groups in Phaser 3 do not work the same as in Phaser 2.

A common question I’ve seen is ” why can I not add a group to a group?”. Let’s have a look at what happens when you add a child to a container or group."

Read More

Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.

The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
  • By Emanuele Feronato
  • 155 Pages
  • 28 Source Code Examples
  • Build a complete game from start to finish
  • Cross Platform
  • Scaling for devices
Buy Now
$19