Joined: 8/3/2009
Posts: 158
This question is specifically about the control configuration menu found in most (if not all) emulators. If we go by the Cartesian coordinate system (which is where the X and Y axis are usually referenced from), then anything that goes up (above the 0) is y+ and anything that goes down (under the 0) is y-. Same with X, anything that goes left is x- and right is x+. Which makes sense in a joystick or dpad. No input means zero and pressing UP should be y+. So, why do emulators have the X axis properly identified (x- for left, x+ for right), but the Y axis is always inverted (y- is up, y+ is down when it should be y- = down, y+ = up)? Can anyone explain it in simple terms?
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 791
Location: California
I don't know what you are referring to exactly, but emulators should identify the direction for your *host* controller correctly. However, not all consoles actually follow this, so it may be the case that you have "inverted controls" due to this. Emulators may also allow inverting your axis to account for this.
Joined: 8/3/2009
Posts: 158
CasualPokePlayer wrote:
I don't know what you are referring to exactly, but emulators should identify the direction for your *host* controller correctly. However, not all consoles actually follow this, so it may be the case that you have "inverted controls" due to this. Emulators may also allow inverting your axis to account for this.
Edited the OP to clarify that I'm talking about the control config menu. Each time you configure the directional inputs, up is always named as y-, but if should be y+ if you look at the Cartesian graph. So what I want to know is why emulators have the x axis properly identified, but the y axis is always named opposite to what the Cartesian graph shows.
Mizumaririn
Other
Player (243)
Joined: 2/26/2020
Posts: 44
Location: Super Bell Hill
From what I know, many games use the 2D coordinate system with positive Y pointing down. It is not a conventional choice, but adjust to fit hardware. I think it is due to power beam in CRTs go from top to bottom over time, as well as viewing a tilemap with 16 bytes per row, when that sprite or tile is drawn can be well presented as a function of x and y with positive coefficients. And that using OAM registers must have positve Y downwards. I am not very knowledgable. I do not know why Bizhawk specifically did this either, despite being a multi system emulator. Just giving my ideas.
pronouns: Mizu/Mizu
Emulator Coder, Judge, Experienced player (732)
Joined: 2/26/2020
Posts: 791
Location: California
If it's doing that, then that's what the controller itself is reporting. Emulators would not be intentionally doing that.
Joined: 8/3/2009
Posts: 158
Mizumaririn wrote:
From what I know, many games use the 2D coordinate system with positive Y pointing down. It is not a conventional choice, but adjust to fit hardware. I think it is due to power beam in CRTs go from top to bottom over time, as well as viewing a tilemap with 16 bytes per row, when that sprite or tile is drawn can be well presented as a function of x and y with positive coefficients. And that using OAM registers must have positve Y downwards. I am not very knowledgable. I do not know why Bizhawk specifically did this either, despite being a multi system emulator. Just giving my ideas.
Thanks, but this is done by pretty much every emulator. Can it be an Xinput/DirectInput naming convention thing?
CasualPokePlayer wrote:
If it's doing that, then that's what the controller itself is reporting. Emulators would not be intentionally doing that.
I see. It must be a Xinput/DirectInput naming convention thing because even Retroarch has the inverted y axis baked in its options even if you haven't configured controller inputs. So I supposed it has become so common, that everyone is naming it that way even if it's wrong/inverted.
Joined: 1/14/2016
Posts: 100
Expanding on what Mizumaririn said, standard coordinates for monitors have the 0,0 in the top left corner, corresponding to a normal x and inverted y compared to a normal cartesian graph. Emulators follow the standard monitor logic. Why the top left corner was chosen, and not the bottom one, probably because now it follows the normal reading order?
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
ReyVGM wrote:
I see. It must be a Xinput/DirectInput naming convention thing because even Retroarch has the inverted y axis baked in its options even if you haven't configured controller inputs. So I supposed it has become so common, that everyone is naming it that way even if it's wrong/inverted.
Analog inputs are usually just integers in a range from 0 to a maximum value. Pushing the stick in the Y direction where the value goes towards 0 would be called Y-. If the value goes towards the maximum it's Y+. There is nothing "wrong" or "inverted" here. The Cartesian coordinate system you mentioned doesn't define a direction. Your image is just one way of depicting it. Stuff could be diagonal for what it's worth.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)
Joined: 8/3/2009
Posts: 158
Masterjun wrote:
ReyVGM wrote:
I see. It must be a Xinput/DirectInput naming convention thing because even Retroarch has the inverted y axis baked in its options even if you haven't configured controller inputs. So I supposed it has become so common, that everyone is naming it that way even if it's wrong/inverted.
Analog inputs are usually just integers in a range from 0 to a maximum value. Pushing the stick in the Y direction where the value goes towards 0 would be called Y-. If the value goes towards the maximum it's Y+.
But the same thing can be applied to the x axis and that one isn't "inverted".
Masterjun
He/Him
Site Developer, Expert player (2047)
Joined: 10/12/2010
Posts: 1185
Location: Germany
ReyVGM wrote:
But the same thing can be applied to the x axis and that one isn't "inverted".
Masterjun wrote:
There is nothing "wrong" or "inverted" here. The Cartesian coordinate system you mentioned doesn't define a direction. Your image is just one way of depicting it. Stuff could be diagonal for what it's worth.
Warning: Might glitch to credits I will finish this ACE soon as possible (or will I?)