Universal Level Formats Library


The Universal Level Formats Library (ulvl) is a simple Python library for reading and writing simple, universal level formats. Three formats are available: the JSON-based JSL, the ASCII-based ASCL, and the XML-based ULX. ulvl also supports importing data from files in the Tiled map editor's TMX format (but does not support saving to that format).

I designed this years ago before I learned about the Tiled Map Editor in an attempt to facilitate a generic level editor. When I found out about Tiled, I dropped the idea, deciding that it was unnecessary due to the existence of Tiled, and began maintaining my own library for reading and writing Tiled's TMX format (the Simple TMX Library, or "tmx"; not to be confused with PyTMX and tmxlib).

However, I have since found the TMX format to be too complex for my use-case, while at the same time I want to continue to use Tiled as a basic level editor. This library is meant to fill that gap: allowing importation of the basic data found in a Tiled TMX file, while also supporting reading and writing of simpler, more generic level formats which could also in theory be used by other editors.