Indeed, mmf uses the standard layout for pixel positioning. Only thing related to graphics i know that does it differently is OpenGL code, and people normally invert the view using that to avoid having to deal with it.
Basically, origin is the top left corner, the frame grows out of that point,
The point of origin (0,0) is at the top left corner. If you want to think of it in terms of a graph, think of the whole screen being the forth quadrant.
It's how monitors work. Monitors show pixels from the top left corner, go left all the way, then go down one line. Since it's going down line-by-line, higher Y is lower.
If you ever get into electrical engineering, you'll find that there are a LOT of terms screwed up. Electrical engineering was invented by a mixture of American physicists and rogue scientists. Heck, "conventional current" is reversed to the electron flow of current.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Originally Posted by Muz It's how monitors work. Monitors show pixels from the top left corner, go left all the way, then go down one line. Since it's going down line-by-line, higher Y is lower.
If you ever get into electrical engineering, you'll find that there are a LOT of terms screwed up. Electrical engineering was invented by a mixture of American physicists and rogue scientists. Heck, "conventional current" is reversed to the electron flow of current.
Yep this is it, its been a convention in software for a very long time.
Applies to many other things, not just click.
I don't think it's that much of a problem really.
Normally there's a much easier way around it than multiplying by -1.
Like when you use ATan2 to find the angle from A to B, you just put the Y components the other way aroud from the X components:
ATan2( Y_ObjectA - Y_ObjectB, X_ObjectB - X_ObjectA )
You don't have to say:
ATan2( Y_ObjectB - Y_ObjectA * -1, X_ObjectB - X_ObjectA )
Or when you make 360 degree movement:
Add "Cos(Angle) * Speed" to X Position
Subtract "Sin(Angle) * Speed" from Y Position
Originally Posted by Adam Phant You know what Clickteam should add for either the next MMF 2 patch or next version? Put the origin in the center of the frame.
I wouldn't say it's a horrible idea, just an incredibly half-baked idea.
If anything, they should allow us to move the point of origin around at run-time or at least in frame properties. However I don't think anyone including myself, would die without this feature. It's one of those mild features that might be pushed back till MMF3. Looking at other programing languages, I can't say it would be too hard to accomplish in MMF2. I don't know the ins and outs of the program and how it functions or interacts with the events to display graphics though. Nothing will be held against Clickteam if they decide they either can't do it or it wouldn't be at all worth their time.
Originally Posted by bigredron Why would they make it so you can modify the point of origin, when all you have to do is create an offset and use that?
Its not rocket science...