OBJECT FILES

The object files used within the game take the form of a commented text file which is split into three distinct areas:

  • General Description of Objects

  • List of Vertices

  • List of Faces

General Description Area

FIELD

FORMAT

DESCRIPTION

Name of Object ASCII characters 30 Character Object name
No. of Vertices Decimal Number of Vertices described in the files
No. of Faces Decimal Number of Faces described in the file
No. Bounding Spheres Decimal Legacy collision detection mechanism. Should be set to '0'
Size Adjustment Decimal Legacy field. Should be set to '1'
Vertex List

FIELD

FORMAT

DESCRIPTION

X Floating Point X position of Vertex
Y Floating Point Y position of Vertex
Z Floating Point Z position of Vertex
Face List

FIELD

FORMAT

DESCRIPTION

Face Type Hexadecimal Type of Face ( Hex format)

0 - Texture Mapped
1 - Flat Shaded ( Legacy value, which should not be used)

Setting the top bit ( e.g. 80) indicates that the face should not be used to calculate a vertex normal.

2 Faces Decimal 0 - Face is Single sided
1 - Face is Double sided
RGB Colours Decimal Two pairs of decimal triples - one for each of the two possible faces.
This is a legacy field used for flat shading.
Textures ASCII characters Two pairs of strings which specify the name of a texture map file.
This is a legacy field.
No. Vertices Decimal Number of Vertices in face - either 3 or 4
Vertices Decimal Index of a Vertex in the Vertex List. Either 3 or 4 such indices should be specified dependent up on how many vertices describe the face.
Texture Coordinates Decimal List of X, Y coordinates into the desired Texture Map. One pair of coordinates should exist for each of the face's vertices.

The vertices used to describe the faces should be arranged in an anti-clockwise order.

Objects which are used to describe cylinders take the form of a thin longitudinal slither and effectively represent nothing more than a profile.