Game data terminology: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(Created page with ";Level data files The data for each level is found in two files in Windows retail Oni, ending in ".dat" and ".raw". On Macs and in the Windows demo, a third file type ending i...")
 
m (adding OBD Home template)
Line 1: Line 1:
{{OBD Home}}
;Level data files
;Level data files
The data for each level is found in two files in Windows retail Oni, ending in ".dat" and ".raw". On Macs and in the Windows demo, a third file type ending in ".sep" is used. These two/three files are collectively called level data files.
The data for each level is found in two files in Windows retail Oni, ending in ".dat" and ".raw". On Macs and in the Windows demo, a third file type ending in ".sep" is used. These two/three files are collectively called level data files.

Revision as of 21:36, 18 July 2014

Click to return to the main OBD page.
Level data files

The data for each level is found in two files in Windows retail Oni, ending in ".dat" and ".raw". On Macs and in the Windows demo, a third file type ending in ".sep" is used. These two/three files are collectively called level data files.

Instance file

Any file ending in ".dat" found in GameDataFolder. Instance files are the main type of data file in the sense that, when loading a level, Oni reads the instance file first, and this file serves as an index that allows it to find resources which are packed into the level data files.

.dat file

".dat" is a generic suffix originally used by Oni for all kinds of data, including persist.dat. The proper, specific name for the .dat files containing level data, as opposed to the .dat files containing the save-game data, films, etc. is "instance file". That being said, ".dat" has only been used by the community historically to refer to instance files, so you can reasonably assume that's what is meant when you see the suffix. On occasion, ".dat" also refers to the complete set of level data files, .dat/.raw[/.sep].

Instance, resource, file

This one can be confusing. An instance is often called a file on this wiki, but an instance is not the same as an "instance file". An instance is an individual resource, such as a texture. They are called files because they are distinct pieces of data stored and cataloged in a "file system" composed of a set of .dat/.raw[/.sep] files. In at least some cases they were indeed actual, separate files on the developer's computer before being packed into the level data files.

When OniSplit is used to split level data files into individual files for each resource, in effect it is creating thousands of "single-instance instance files", at which point "instance", "file", and "instance file" become fully synonymous. The format of instance files is documented HERE.

Raw file, .raw / Separate file, .sep

A type of level data file found in both Windows and Mac Oni. On Macs and in the Windows demo these files are much smaller because several resource types store their data in .sep files instead. These files generally store large and unstructured data like textures and sounds. They have no file header, since the instance file serves as the table of contents for them.

The only structural rule about binary files is that all data parts are stored 32 byte-aligned and the first 32 bytes of the file are always zero (reserved to represent null pointers). At load-time, the offsets given in the instance file are converted to pointers to the data in the binary files. You can learn the format of raw and separate files HERE.

Template, file type

A template represents a type of resource. Templates are identified with four-character codes, often called tags in other communities, such as "SUBT" for subtitle files. Just as instances are often called files on the wiki, templates are often called file types. All templates are listed on the File types page.

.oni

Generated by OniSplit, these files are Windows-format .dat files which basically contain a single instance extracted from an instance file, with all the instance data that was contained by the .raw/.sep files appended at the end.