Bethins

Villager
Member
Joined
Nov 4, 2012
Messages
69
Reaction score
0
First Language
English
Primarily Uses
What exactly does viewport do? I've only encountered it with the default help window so far. I understand that it has something to do with layers, but why would you need multiple layers in the help window? I'm still a noob, so be gentle please :)
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
366
First Language
English
Primarily Uses
think of the screen has sheets of paper stacked on top of each other. So one sheet will have all the information about the map. In that sheet you can have stuff drawn above or below elements in that sheet.. like your character could walk behind a tree or in front of a bookshelf.

I'm not well versed on all the layers.. but I believe one does weather effects. So no matter what you do to your map layer, the weather layer will always be on top of the map layer. This prevents stuff like ran drops falling behind tall trees and looking all wierd.

Windows are usually (but not always) put into their own layer so they don't get layer glitches. Like maybe your map has a picture called when you open a text message. Well if the viewport are set wrong.. then perhaps your picture prevents your message window from being seen.

That's the purpose of viewports.. they just hold visual sets of information that you can do things with. Like screen shaking uses the map viewport and moves everything in it all at once instead of you having to go and determine everything that you want to shake and then moving them all individually.

This could probably be explained better, but that's the basics.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,647
Reaction score
15,735
First Language
English
Primarily Uses
RMMV
Yeah, that's pretty much it.


In the RTP, all the menus have only a single viewport - they don't "layer" stuff like the maps do, 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, 2 has a z-value of 50 and 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.


The arrangement of the battle scene follows the same order, though I don't see an allowance for weather effects in the battle spriteset (which is strange, because I thought you COULD have weather in battles ...)
 
Last edited by a moderator:

Latest Profile Posts

SF_People3_1 added!
index.php

Micro rant. The worst part of working from home when you live with your family is seeing how inconsiderate they are. "Hey, you're sitting in front of your computer, that means you're not doing anything! I want to put the TV at 200 decibels!"

If I was working in the office would you still talking me like that?
It's definitely discouraging when streamers give a try-to-say-it-nicely (i.e. bad) review of your game demo. It's like jumping into a cold pool. Bad initally, but it gets better with time. And you are now more alert and see better.
Some screenshots of the pub and lodging with the beginnings of clutter taking shape
TTp8uCw.png

jtC202e.png

bSXgyVl.png

eRx9PUF.png
Backgrounds are not my strong suit... :kaodes:
DazI8jt.jpg

Just realized I forgot doing the clouds... woops

Forum statistics

Threads
118,507
Messages
1,116,487
Members
155,507
Latest member
2dweeb6ae
Top