Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way I can flip the coordinate system in Pyglet vertically so that y = 0 is at the top of the screen and a higher y value is closer to the bottom? It is really confusing trying to use Pyglet's flipped coordinate system with Ogmo Editor.

share|improve this question

Just use the maximum height of the window for your calculations:

When setting:

py_Y_Value = max_Screen_Height - my_Y_Value

or when getting:

my_Y_Value = max_Screen_Height - py_Y_Value

The best way to utilize these would be to abstract away their use in wrapper functions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.