Friday 21 April 2017

Viewports

As explained by Shaz at:
https://forums.rpgmakerweb.com/index.php?threads/viewport-for-dummies.32585/

In the RTP, all the menus have only a single viewport, though you can still put things in front of or behind other things by changing the individual sprites' z-values.

On the map and in battles, there are three viewports. Viewports also have z-values.

Viewport 1 has a z-value of 0, Viewport 2 has a z-value of 50 and Viewport 3 a z-value of 100. Then things are layered inside these viewports by the sprites' z-values, just as they are in the menus.

If you have something in viewport 1 with a z-value of 500, anything in viewport 3 will still appear in front, even if those sprites have lower z-values.

Viewport 1 on the map contains the map itself, the background parallax, the character/event/vehicle sprites. When you set the screen tone or make the screen shake, only things on this viewport are affected.

Viewport 2 holds the weather and timer sprites and pictures. When you make the screen flash, this viewport is affected (which also has the appearance of affecting Viewport 1 as well, as this one is in front).

Viewport 3 takes care of the screen brightness, when you do a fade in or fade out or transfer.