ARTWORLD – resize canvas

We want the game to be an ’empty’ canvas. The shape or size is not predefined.

So when resizing the window (when possible), the window should show more of the world, leaving all the elements where they where.

Phaser has a scale manager build in that handles different preferences

This one is suitable for our case:

There is also this examples, but it leaves scroll bars in the window:

When resizing some elements have to updated:
* the camera bounds
* the background bounds
* elements that are scaled or positioned relative to the window width and height

We try to give everything an absolute position.

If the player wants a more scaled up view, we provide zoom in and out buttons for that.

Here is camera zoom control example:

In the main menu, zooming the camera out, does not update the background. So I would have to use the ScaleManager here.

In the main game the background is set to very large, maybe there this technique does work…

Zooming with the ScaleManager does nothing…

Article about rescaling scenes: