Precompiled binaries for other platforms will appear sooner or later.
Source files contain code sources (.c) and headers (.h), but not makefile.
You can compile them with the help of any C compiler, no additional libraries required.
First of all, GCDL library currently accepts only UTF-16 LittleEndian text files without encoding signature, so make sure to make appropriate file.
Each GCDL file consists of different objects. Each object should be separated from others with comma. The last object does not require comma.
Whitespaces, tabs and new lines are considered as space characters and should be skipped (unless wrapped with quotes).
object1, object2,
object3
There are 5 types of objects: structures, fields, arrays, array items and vectors. Each of them have different synthax and can also nest (or not) other objects.
Let's review them by this order:
-
Structure has a name and can only contain other objects. It's beginning and end are marked with curly braces ({}) - the first one goes after structure's name, the other one - after the last structure's member. It can also contain other structures, making the language very flexible.
foo {
baz: 123,
bass: "hard"
}
-
Field has a name and a value. A value can be one of the following types: integer (byte, short, normal, long), real (floating-point, fixed double), character and string.
The value is separated from the name with colon. In order to make string contain this and other special characters, use quotes ("").
health: 7.5f,
name: "acid tree"
-
Array has a name and contains array items. These items are like a vector without the name. Array can contain items of any type. Curly braces are required at the beginning and the end of an array.
Troops {
"Chuckles", 150, 10.5f, 0.5f,
"Ashe", 100, 35f, 1.5f
}
-
Vector has a name and contains it's own items, but behaves more like a field. Vector can contain only items of the same type.
Incoming (0.5f, 1f, 1.75f, 2.75f)
Other features and limitations you may did not know:
- GCDL supports C-style one line comments:
Troops {
// How troops' attributes are interpreted:
// Name, health, damage per shot, shots per second
"Chuckles", 150, 10.5f, 0.5f,
"Ashe", 100, 35f, 1.5f
}
- Support of escape characters ('\n', '\t', '\b' etc.) isn't implemented yet.