Adventure Game Studio

Community => General Discussion => Topic started by: CorCAD on Fri 30/01/2004 19:29:46

Title: x and y
Post by: CorCAD on Fri 30/01/2004 19:29:46
Dont know where else to put this... as it's just a general rant.

I'm a CAD Designer, and frankly I can't stand the co-ordinate system in AGS. Its backwards from the norm for me. Shouldn't the 0,0 point be in the lower left-hand corner. Y values should go up the screen! X is another subject alltogether. Hmmm I don't expect to get any sympathy for this meaningless post, but this is my beef for the day! Any thoughts on this or am I alone.  ???

CorCAD
Title: Re:x and y
Post by: Ghormak on Fri 30/01/2004 19:35:29
You are both right and wrong, heh.

It is true that it's common in mathematics to place origo in the bottom-left, but in the world of computers the coordinates for pixels on screen have 0,0 in the upper left.

Can't really say I feel your pain, but I understand your point of view.

/me is, as always, neutral in matters of discussion
Title: Re:x and y
Post by: CorCAD on Fri 30/01/2004 19:38:10
They did it in Paint Shop Pro too

Grrr

:'(

CorCAD
Title: Re:x and y
Post by: Trapezoid on Fri 30/01/2004 19:39:31
So, does reading and writing piss you off too? It also starts at the top left.
Title: Re:x and y
Post by: CorCAD on Fri 30/01/2004 19:41:37
LOL   ;D   That is a hellava good point.

CorCAD
Title: Re:x and y
Post by: Darth Mandarb on Fri 30/01/2004 20:12:01
To me, it makes more sense to start from the top left.

I dabble in 3D from time to time and the coordinates system always confuses me (and causes me to make boo-boos!)

The program I use most is Photoshop and 0,0 is top/left so that's what I'm used to.

Interesting ...
Title: Re:x and y
Post by: Peter Thomas on Fri 30/01/2004 21:58:51
I understand you completely!! :)

I was so used to starting bottom right in all my math classes that it took me AGES to get used to the AGS way (as well as other progs). But now I'm used to it, and I don't notice until someone (ie. you) points it out.

Give it a couple more months and it'll be second nature...
Title: Re:x and y
Post by: Domino on Sat 31/01/2004 00:43:03
Well, i have been used to 0,0 being the top left of my screen ever since i was progamming in Basic.

A long time ago, i used to program my own adventure games in basic and had to draw every screen using the Basic command of Line (0,0)-(100,40),4  - and that is how i have always remembered the X,Y to be. So, i guess i am used to the way AGS uses the mouse coordinates.

BG  :)
Title: Re:x and y
Post by: earlwood on Sat 31/01/2004 01:03:42
 :o, What you mean it isn't just random and messed up coordinates!? I just used trial in error in my game...
Title: Re:x and y
Post by: Kairus on Sat 31/01/2004 03:07:29
The system used in AGS is the same system used for almost all direct screen manipulations and is consistent with the mathematical view as well. The point is that the screen is a matrix (nothing to do with Neo, I mean a REAL matrix) and in math the coordinates in matrixes are given by ( row, col ) starting ( 0, 0 ) on top-left corner of the matrix.
The other notation you may be used to is the function notation where the origin is located on the bottom-left corner, but then again, if we wanted to use that it would be better to use the origin in the middle of the screen and allow both positive and negative coordinates. No point in doing that, so in my opinion the matrix system is fine.
What really upsets me (sometimes) about the coordinate system is that object coordinates are considered from the bottom-left corner and the character coordinates are considered from the bottom-middle corner, and adding more confusion, most drawing programs use coordinates from the top-left corner. This problem leads to many sudden-sprite-jumping-in-animation effects in some AGS games I've seen.
Title: Re:x and y
Post by: CorCAD on Sat 31/01/2004 05:07:53
Ummm very convincing arguements. But take this into account.

I design your roads, sewers, waterlines, fiber optics, TV, cable, and pretty much everything else essential to our way of life. Why couldn't the whole world revolve around me for a change, and not "ROGER". I almost feel like I have a split personality. The AGS and CAD struggling to keep the matrix of x,y from disintegrating in front of my eyes.

I'm sorry if this sounds over dramatic. But like I said from the beginning, this is only for fun and completely meaningless and shit it's time to go to bed. Gunight!

CorCAD
Title: Re:x and y
Post by: MillsJROSS on Sat 31/01/2004 07:20:01
If your working with our sewers, waterlines, and more; than I'm scared if you can't figure out the coordinate system. Scares me!

-MillsJROSS
Title: Re:x and y
Post by: Pumaman on Sat 31/01/2004 12:52:21
This is a bit of an odd one. Kairus' explanation sounds plausible, but it's still rather annoying and I can appreciate that it could get quite confusing if you were working with mathematical co-ordinates in your day job and then computer co-ordinates in your AGS'ing. Still, it's one of those inexplainable little inconsistencies that keeps life fresh and interesting :P
Title: Re:x and y
Post by: Evil on Sat 31/01/2004 14:41:30
Hmm, all the CAD programs I use all start with 0,0 in the upper left. Yet the CnC starts at the lower left... Inversion maybe?
Title: Re:x and y
Post by: Kairus on Sun 01/02/2004 01:49:56
I'll tell you something: when I started reading tutorials and experimenting on graphic programming I was also used to the math functions system where the origin is bottom-left, and also wanted to change the whole programming world because I thought that was the 'normal' view. Later on I began learning about matrixes and suddenly it became clear why they were arranged that way and why the screen was arranged like that, too. Believe me, it's useless trying to change this, it's too widespread, just use it until you finally get used to it, and you'll find that being used to two coordinate systems will help you understand some other more complicated ones.
Title: Re:x and y
Post by: shbaz on Sun 01/02/2004 02:16:37
Evil, what CAD programs? You may be confused as to what he's talking about. Engineers use professional software designed around the old method of using a drafting board to draw out our Engineering wonders. In AutoCAD, the program I'm learning for Electrical Engineering, the coords also start from the bottom left. It is consistant with the coordinates system in Calculus, Trig, and all other maths except there is no need for negative numbers so they are ommitted. It goes with the standard thought that up and right are positive and down and left are negative. In computing I believe the reason coords would start in the top left would be because that's where your monitor begins drawing pixels. Makes sense, right?
Title: Re:x and y
Post by: Kairus on Sun 01/02/2004 02:26:39
QuoteIn computing I believe the reason coords would start in the top left would be because that's where your monitor begins drawing pixels.

And it's also the way you read. In my opinion, that's why monitors begin drawing pixels there, too. I may be wrong, of course.
Title: Re:x and y
Post by: Evil on Sun 01/02/2004 02:40:31
Jackhammer, my friends dad works for a coresponder with Deer. He cuts tractor parts with a laser. He gives me all of my CAD programs. He's got a wood CnC at his house and every once in a while he'll let us cut at his work (Mmm, lasers). It cuts through 2 1/4 steel, so plywood is a breeze. Sidetracked, anyway, I've use AutoCAD, turbo, some 2d Cad+ or something at school, 3dCad, and some others. But they all render 0,0 in the upper corner and cut 0,0 in the lower. It like flips itself.

Edit: Oh and...
Quotethere is no need for negative numbers so they are ommitted

Ah, but that all matters where your positive quardrant is at. Your positive (1st) quardrant can go anywhere.
Title: Re:x and y
Post by: CorCAD on Sun 01/02/2004 17:28:46
Nice to hear some intelligent conversation on this topic. In all honesty I was joking about the whole deal! I can see both sides of the story, and agree with neither of them. My life is too short ( I've got a arthritis in my ear lobes, the doc said i've only got 6 weeks) to be spending time on changing the world. Maybe i'll start with my t-shirt.... I just took a whiff and it reaks.

:P

Laters co-ordinate haterz  ;)

CorCAD
Title: Re:x and y
Post by: shbaz on Sun 01/02/2004 19:11:43
QuoteAh, but that all matters where your positive quardrant is at. Your positive (1st) quardrant can go anywhere.

But by default it is in the bottom left, and there really isn't any reason for it to be anywhere else that I can think of. I've only been using it a couple of weeks because I just started the class though, so I think you know more about it than me. I didn't expect you'd have a copy of Autocad because it's such an expensive program and hard to find pirated.

Good luck with that earlobe arthiritis CorCad. Maybe you can stretch it to 6 1/2 and make the game a bit longer.
Title: Re:x and y
Post by: Evil on Sun 01/02/2004 22:50:48
Yes, his dad "lends" me much of his software. He gets a lot of it from co-workers... I also enjoy playing with my delux professional version of Maya... :)