Screen coordinate layout questions

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
67
Reaction score
10
First Language
English
Primarily Uses
RMMV
Simple questions.

1. What is the X and Y layout of the screen coordinates? My initial assumption is that X is horizontal and Y vertical like it was when graphing something in school, but I've seen too many things that don't use that standard.
2. Where is the origin (0,0) located? Is it in the center, bottom left, or upper left?
3. Does the size of the screen change if you make the game window bigger (e.g. maximize it)
4. Are X and Y coordinates absolute to the screen, or are they relative to some object being referenced or does it vary?
 

Mewgles

Veteran
Veteran
Joined
Jul 24, 2020
Messages
85
Reaction score
89
First Language
German
Primarily Uses
RMMZ
1) X is horizontal, Y vertical. X = 0 is left side. Y = 0 is the top.

2) The coords (0, 0) would be top left corner.

3) The size does not change. It stays at the resolution you've set it. Unless you give the player the option to manually change the resolution.

4) They are relative to the object they are used within. So if it's within a window (for text for example), it refers to the borders and size of the window.
 

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
67
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thank you!

Seems like so much of the stuff that I have trouble with is the underlying basics that everyone else seems to just know. Makes it sort of like trying to build a house, roof first. lol
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Are X and Y coordinates absolute to the screen, or are they relative to some object
if you go to the control variable command, you'll find that you can get two different XY values - Screen XY and Map XY.
Screen XY is in pixels and absolute to the screen itself
Map XY is in tiles and based on the map (which is only partially on the screen, and each tile is 48x48 pixels unless changed by plugin
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top