Page 1 of 1

Is it just my imagination or are X and Y flipped?

Posted: Mon Mar 04, 2024 3:01 am
by Crayon21
Every time I program a character to move, the screen for X and Y would normally map up to y along with down and left/right to X but on the spectrum (please lord let this be the only 8 bit with this issue) the Y is left/right and the X is up/down. I know my left from my right and up from down, so please tell me I'm not going insane here.

Anyway, programming for movement is a nightmare because I have to rethink the cartesian coordinates system. Moving left and right moves me downward for some reason and moving up is fine but moving down does not work. I've checked and rechecked my code. I know what I'm doing.

I think Sir Sinclair (RIP) failed geometry class or just didn't care. How did programmers get anything done with this insanity?

A normal mapped screen places X at the mid point and Y at the top. The sinclair machines place X and Y at the top left.

I need an aspirin :D :lol:

Re: Is it just my imagination or are X and Y flipped?

Posted: Mon Mar 04, 2024 5:57 pm
by Dim_75
As Yoda said :
You must unlearn what you have learned :mrgreen:

Re: Is it just my imagination or are X and Y flipped?

Posted: Mon Mar 04, 2024 7:58 pm
by Spinnetti
its maddening to have a messed up coordinate system. In my code, I treat X and Y the "right" way and use the code to transpose as needed.

Re: Is it just my imagination or are X and Y flipped?

Posted: Mon Mar 04, 2024 8:01 pm
by Moggy
In fairness it's Steve Vickers to blame not Sir Clive.

Re: Is it just my imagination or are X and Y flipped?

Posted: Mon Mar 04, 2024 8:11 pm
by Crayon21
so Y is X and X is Y?
Christ on a cracker steve!
:lol:

Re: Is it just my imagination or are X and Y flipped?

Posted: Tue Mar 05, 2024 2:54 pm
by 1024MAK
I assume you are talking about the PRINT AT a,b ?

In BASIC in general, only TAB is universally supported.

Individual BASIC implementations hence use their own systems. It's just something you have to get used to.

If it helps, it's the character position, hence not graphics related. With a character text screen, the "home" position is top left.

Mark