We are used to the origin in a coordinate system (0, 0) being in the bottom-left corner of a grid. In Pygame, and in many graphical frameworks, the origin is at the top left corner. So on a 1200x800 game window, the top left corner is (0, 0), and the bottom left corner is (0, 800). If you want to move up from the screen, you steadily decrease the y-value.
The origin is placed at the top because the top of a window is typically static on a screen. When people resize their windows, they typically drag the bottom of the screen, and any overflow happens at the bottom.
If you're curious to see the actual coordinates of any game object, you can throw a line into the _update_screen() method like this:
The origin is placed at the top because the top of a window is typically static on a screen. When people resize their windows, they typically drag the bottom of the screen, and any overflow happens at the bottom.
If you're curious to see the actual coordinates of any game object, you can throw a line into the _update_screen() method like this:
print(f"Ship coordinates: {ship.rect.x} {ship.rect.y}")