Y oh Y, or which way should the Y axis go in my new game engine

I am writing a 2d game engine, http://glass-flame.blogspot.com, and before I get any further I want to ask whether the +y axis should go up or down, and where the point 0,0 should go.

The view will behave as window in to a world that may be much bigger than what you can see, so I was thinking the 0,0 maybe should go in the middle, what do you think?

I personally prefer 0,0 of the “canvas” / “window” being in the top-left corner. OpenGL has it in the lower left corner, and sometimes this gets confusing (for instance when using the TextRenderer in JOGL), but top-left is Java’s 0,0.

I otherwise work with 0,0 as a middle point when drawing objects in JOGL. Not because I necessarely like it, but because it makes rotation and scaling of the object so much easiar.

I don’t like having the Y ‘upside down’, but if people think that game programmers will prefer it, then that’s what I will do.

I find that I think that down is positive from all the games I’ve programmed. However, it’s an easy switch to make (right now the project I’m working on is the opposite).

Yeah it’s pretty annoying the way the y-axis is inverted, it makes trigonometry pretty difficult. But since java2D has the y-axis upside down, you may as well go with that since everyone’s used to it and their existing code assumes this.

By the way, I’d first make a 2d game, then pull the stuff out that you’d like to make into an engine. Doing it the other way around can stunt your productivity. By the looks of your blog you’re pretty talented at pulling off nice-looking art etc so you’d be able to pretty quickly get something up and running that looks good. That’s cool that you’re using JBox2D, that’ll make your demos look awesome.

this is really up to you, personnaly I prefer y=0 and x=0 at the center of the screen with y pointing up and x pointing right, I found such axis easier to manage.

EDIT:
maybe, the only requierment is that you show the direction of your y vector in your documentation and samples of your engine

OMG someone actualy read my blog, and liked it to! Thanks.

I think I will go with Y just like Java 2d, because that should make it easer to use. What do you people think of making the coordinate system configurable when you create the game engine object?

That’s a good idea. Or at least allow translations.