Page 1 of 4

The Grid

PostPosted: Wed Jun 03, 2009 3:05 am
by BlarghNRawr
Any specific reason the y-axis is flipped in game editor? in ge, up is - on the axis and down is +

on a Cartesian plane the y-axis is the other way. this also messes up the quadrants by flipping them vertically..
Normal.PNG
A Normal Cartesian Plane

Game Editor.PNG
The Game Editor Grid



im just curious is all :wink:

Re: The Grid

PostPosted: Wed Jun 03, 2009 7:21 am
by Bee-Ant
I assume its because gravity.
As you know, your gravity will be + if you fall to down, and - if fall to up.
GE's axises implement real axises, while cartesian is for graph...

Just maybe. i dunno it either :D

Re: The Grid

PostPosted: Wed Jun 03, 2009 12:11 pm
by Hblade
Here, I'll explain how come the -y and +y are reversed. This is cause on a real grid, it uses real x-y, but in video games, x - y starts at the very top left. (the first pixel), and when you move down, you are adding 1 pixel, so you would be saying "y = y + 1", that means you move down by 1 pixel, on a real grid this would move up but it's different in video games :D.

Re: The Grid

PostPosted: Thu Jun 04, 2009 2:13 pm
by Kalladdolf
Also, this method is handy for spriting measurements.

Re: The Grid

PostPosted: Fri Jun 05, 2009 5:03 pm
by Bee-Ant
Is this method applied to all game software as well?

Re: The Grid

PostPosted: Fri Jun 05, 2009 5:21 pm
by Kalladdolf
The ones I can think of, yea.

Re: The Grid

PostPosted: Fri Jun 05, 2009 5:28 pm
by Bee-Ant
How do you know?
Do you game software other than GE?

Re: The Grid

PostPosted: Sat Jun 06, 2009 9:31 am
by Kalladdolf
Usually I use GE, but I also experimented with lite-C and PureBasic 4.

Re: The Grid

PostPosted: Sat Jun 06, 2009 12:37 pm
by makslane
BlarghNRawr wrote:Any specific reason the y-axis is flipped in game editor? in ge, up is - on the axis and down is +
on a Cartesian plane the y-axis is the other way. this also messes up the quadrants by flipping them vertically..


In the Game Editor design phase, the idea was follow the same direction of the computer screen to avoid few CPU cycles.

Re: The Grid

PostPosted: Sat Jun 06, 2009 2:51 pm
by Bee-Ant
What cycle max?
You just need to put screen*-1 right to invert the value?

Re: The Grid

PostPosted: Sat Jun 06, 2009 4:44 pm
by makslane
Today, may be was a wrong decision, but in 2002, with planning to execute in every mobile device, I think was not so wrong :-)

Re: The Grid

PostPosted: Sat Jun 06, 2009 7:46 pm
by pyrometal
The best type of code around is the hardware friendly type! That way you can accomplish the most with the least clock cycles, and allow more restrained platforms to perform better! lol

Re: The Grid

PostPosted: Sat Jun 06, 2009 8:17 pm
by Fuzzy
It was the right way to do it. CRT monitors draw left to right, top to bottom. Modern LCDS dont care of course..

It also followed conventional methods of 30+ years. Computers have always had the origin in the top left.

As Bee-Ant correctly said, it follows the laws of gravity.

Makslane, I wouldnt have done it any differently. You do good work.

Re: The Grid

PostPosted: Sat Jun 06, 2009 11:02 pm
by Bee-Ant
Oh, i was right afterall...

I want to ask something simple that till today i dunno what its mean.

yvelocity+=10;

What its mean?
10 pixels permilisecond?

Re: The Grid

PostPosted: Sat Jun 06, 2009 11:20 pm
by makslane
10 pixels per frame