Star Trek 25th Anniversary PRI Files

The PRI files in the Star Trek 25th Anniversary store the priorities for background images. This format is simply 32000 bytes which should be interpreted as a 320x200 array where each byte is two pixels (top 4 bits the left pixel, bottom 4 bits the right pixel). For those not familiar with priorities, these are the depth map for the image that tells the game how far back from the camera each pixel is in the scene, with lower priority pixels further in the distance. This allows for proper occlusion while charater sprites navigate the world. Priority 0x0 pixels are all the way in the background and will never be drawn in front of a sprite. Priority 0xF pixels are always in front.

Of note in this file: the left-most column of pixels is always a scale which tells you what priority a character sprite should have when they stand at that y-coordinate.

An Alien Control Center The Priority for the Alien Control Center

You can find a download of all of the PRI files extracted and converted to png in this zip file.

A Pet Peeve

You sometimes see people laughing about how early adventure games, particularly King's Quest I, called themselves "3D adventure games." To me, the priority layers really prove that indeed these should be considered as 3d games, just living in a time where the scene had to be pre-rendered from a single angle, then composited with the depth buffer after. By combining the coordinates of the pixels with the priority, you get an x,y, and z component for every pixel on the screen, and the game would not look or play properly if that were not so. That seems pretty 3D to me.

Back.