Coordinate systems

AVR games use various coordinate systems.

3D Room coordinates
All entities in a room are located using 3 variables: x, y and z. As shown in the diagram, the x value goes from left to right, the y value from bottom to top and the z value from front to back. All coordinates are normalized, meaning that 0 represents the lowest extremity of the axis (e.g. for x, 0 = left) and 1 represents the highest extremity.

The server agent for an AVRG only uses this coordinate systems because other systems depdend on the display so don't make sense on the server.



Decor (or 2D room) coordinates
This is a two dimensional system that measures the location in pixels relative to the top-left corner of the room decor graphics. This removes all effects of stretching and scrolling so is absolute for all clients. Note that it's not possible to convert a decor coordinate to a 3d room coordinate without more information.

Since the coordinates are relative to the decor's pixel size, the values representing the right hand and bottom edges of the room will vary. The diagram shows the axis coordinates for a 800x600 decor.



More to come

Paintable area
This is a 2D pixel coordinate system that is relative to the parent display object of your game's interface and therefore useful for actually setting the x and y properties of your top-level user interface display object.

Note that the values of paintable coordinates that correspond to the right and bottom edges of the visible area depend entirely on the user's window size and whether they have zoomed into the view. When the user zooms in, the area can be substantially taller.