Jump to content

Game data terminology: Difference between revisions

updating for OniX 1.0.0
m (correcting template name)
(updating for OniX 1.0.0)
 
Line 1: Line 1:
{{OBD Home}}
{{OBD Home}}
{{UpdatedForOniX}}
{{UpdatedForOniX|1.0.0}}
;Binary data
;Binary data
A collective term for the game data that Oni runs on. It is mostly distributed into the level data files; though some additional data is found in persist.dat, the term "binary data" tends to refer only to the level data files. Not to be confused with "binary", which refers to a compiled application.
A collective term for the game data that Oni runs on. It is mostly distributed into the level data files; though some additional data is found in persist.dat, the term "binary data" tends to refer only to the level data files. Not to be confused with "binary", which refers to a compiled application.


;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 file type ending in ".sep" is also used. These two/three files are collectively called binary data, or 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 file type ending in ".sep" is also used. [[OniX]] also expects .dat/.raw/.sep files, so after the user's game data has been converted for use with OniX, .sep files will be in use. A set of these two/three files are collectively called level data files.


;Instance file
;Instance file
Line 22: Line 22:
During development, these types of level data files were eventually created as companions to instance files. The kinds of resources stored in these files are generally those with larger amounts of data, like textures and sounds.
During development, these types of level data files were eventually created as companions to instance files. The kinds of resources stored in these files are generally those with larger amounts of data, like textures and sounds.


Raw files are found in both Windows and Mac Oni, whereas separate files only occur on Macs and in the Windows demo. When separate files are present, raw files are much smaller because several resource types have their data stored in the separate file instead.
Raw files are found in all versions of Oni, whereas separate files, in vanilla Oni installations, only occur in Mac Oni and in the Windows demo. As mentioned earlier, when using OniX, Windows retail installations will also use .sep files because that is the level file format that the engine expects. When separate files are present, raw files are much smaller because several resource types have their data stored in the separate file instead.


Raw and separate files have no file header, since the instance file serves as the table of contents for them. The only structural rules about raw/separate files are that all data parts are stored 32 byte-aligned, and the first 32 bytes of the file are always zero (reserved for runtime pointers). When a level is loaded into memory, the offsets given in the instance file are converted to pointers to the data in the raw/separate files. You can learn the format of raw/separate files [[Raw|HERE]].
Raw and separate files have no file header, since the instance file serves as the table of contents for them. The only structural rules about raw/separate files are that all data parts are stored 32 byte-aligned, and the first 32 bytes of the file are always zero (reserved for runtime pointers). When a level is loaded into memory, the offsets given in the instance file are converted to pointers to the data in the raw/separate files. You can learn the format of raw/separate files [[Raw|HERE]].