Coordinates

There are three coordinate systems in common use in mathematics and computer science, so it is quite important to be clear about which one you are using. They are:

In computer science, the third of these is very common, probably because it is a compromise between thinking of the screen as a geometrical space and as a matrix of pixels at the same time. The reconstruction uses graphics coordinates throughout the code, though some resources such as level files use matrix coordinates.

The original game used graphics x, y coordinates, except when communicating with the curses library which uses matrix coordinates, so you see screen[y][x] a lot in the original code.


Back