Coordinates
Reference
Ref_Coordinates.html

Name

Coordinates - Cordinates used in the Game, especially Object Codes

Synopsis

(x,y,z)

Availability

all GTA Demos, GTA Full Version

Description

Objects are placed on the map using coordinates. These can be given in 8-bit, 14-bit or Zero format. Which format to use depends probably on the object code.

8-bit Coordinates

Imagine the map composed of 256x256 square tiles. Now imagine the GTA world composed of 256x256x6 cubes. Cube (0,0,0) is in the top upper lefthand corner, while cube (255,255,5) is in the bottom lower righthand corner.

Height (z) levels:

Cubes in level 5 are below sea level.
Cubes in level 4 are below street level, but above sea level.
Cubes in level 3 are below most trains and bridges, but above street level.
Cubes in level 2 are below some bridges and most rooftops, but above the train tracks.
Cubes in level 1 are even higher.
Cubes in level 0 are highest.

When the player is in level 5, he's dead (usually).
When the player is in level 4, he's falling (usually).
When the player is in level 3, he's walking or driving (usually).
When the player is in level 2, he's on a station or in a train (usually). The stairs up is still in level 3.
When the player is in level 1, he's driving on a high bridge (for example).
When the player is in level 0, he has jumped off Schelchberg bridge in Liberty City (for example).

Objects (Cars, Phones, ...) are usually placed in level 4 so the player (who moves in level 3) does not bump against them but moves over them.

14-bit Coordinates

Some Coordinates are given as 14-bit-Coordinates. You can now imagine the game world made up of 16384x16384x384 small cubes, but you can just as well imagine each of the 256x256x6 big cubes made up of 64x64x64 small cubes.

Divide a 14-bit-coordinate by 64 to get the 8-bit-coordinate; the remainder tells you where in that big cube the small cube is.

Example:
(864,14114,192) CRANE: This Crane is located in big cube (864/64,14114/64,192/64) = (13,220,3). Within this cube, the crane is located (864-13*64,14114-220*64,192-3*64) = (32,34,0) small cubes from the top upper left-hand corner.

Zero Coordinates

For some keywords, it is unknown whether they have 8-bit or 14-bit coordinates. This is because the coordinates are always set to (0,0,0). This probably means that for these objects the location is irrelevant and can always be set to (0,0,0).

See also

MISSION.INI, Object Statistics

Notes

Information contributed by Michael Mendelsohn.

Bugs

It is currently unclear whether 8-bit and 14-bit coordinates can be used with any object code.


MISSION.INI

Last change: 27 Dez 1997

unofficial GTA Reference