PGE-X File format

PGE-X (PGE Extendable) - Universal and flexible text file format used in the PGE Project. The main thing of this format - is a marking of values and separating data with data sections.

Sections
Sections - are named data containers which writing with large letters without using of degits and spaces. Section should be closed with the same string which began section but with appending of '_END' pirce:

DATACONTAINER ... DATACONTAINER_END

Sub Sections
PGE-X Format giving able build the data trees:

DATACONTAINER ... SUBCONTAINER ... SECONDSUBCONTAINER ... SECONDSUBCONTAINER_END SUBCONTAINER_END DATACONTAINER_END

Data Entries
Data entries have two types: structure and plain text.

Plain text
Plain text data entries using whole space of data containers:

DATACONTAINER This is a some example of plain text data entry I think, you understand this style of file format building... DATACONTAINER_END

Structure
Each data entry have each line. Parameters separated with a semicolon “;”. All parameters must have a markers. Marker and value separated by colon “:”. Non-exist markers will be skipped. Not allowing to use parameters without markers. Data-type for each parameter defining by its internal. Data-types closed by its markers. Always possible add new marker with possible to save compatible with old versions. Some valued which equal to default values can be doesn't written into the file to reduce size of target file.

DATACONTAINER VAL1:"test";VAL2:"Meow \:3";VAL3:45; DATACONTAINER_END

Implementation
Main implementation that does using of PGE-X format is PGE File Library which is written in C++ as part of PGE Project and later was organized as independent C++ library that can be used for both STL and Qt (with using of Qt specific containers like QString, QList, QVector, etc.).

File formats using PGE-X
PGE-X data format is used in data files in PGE Project.

.LVLX - level file format. (Extended Level file) Download specification: ODT, PDF

.WLDX - world map file format. (Extended World map file) Download specification: ODT, PDF

.SAVX - a game-save file format of PGE Engine.

.LVL.META - an extra meta-data store (primarely, position bookmarks) for legacy SMBX64 LVL files. Doesn't appears when there is no these data used.