-
Notifications
You must be signed in to change notification settings - Fork 13
Config File Format
crogine uses a simplified text-based file format for configuration files. It implements a simple object/property paradigm which can be nested, and reasonably represents any data type crogine needs without additional bloat. An example file may look like:
ObjectName ObjectID
{
SomeProperty = 1
SomeOtherProperty = 2.5
ThisProperty = "is a string value"
NestedObject
{
HasID = false
}
}
Objects are consider to have a name and an optional ID. They are denoted by the opening and closing braces, which include one or more properties and other objects. Properties can have values of:
- string
- float
- int32
- uint32
- floatArray[2]
- floatArray[3]
- floatArray[4]
Further types such as colours or rectangles are represented by 4-component float arrays. Config files are read and written in crogine with the ConfigFile class, which contains functions not only for reading and writing files, but parsing and iterating the contained data.
Specific uses of Config Files in crogine are:
- Sky Box File Format
- Model Binary Format
- Model Definition Format
- Sprite Sheets
- Audioscapes
- Particle Systems
Although they can be used for any kind of configuration data, for example loading and saving game-specific settings.